Colin Gordon avatar Colin Gordon committed 9ca12a5 Draft

done, modulo cleaning up annotations after some checker fixes

Comments (0)

Files changed (4)

logviewer/de.anbos.eclipse.logviewer.plugin/src/de/anbos/eclipse/logviewer/plugin/commands/OpenWith.java

 		// TODO Auto-generated method stub
 	}
 
-	public Object execute(ExecutionEvent event) throws ExecutionException {
+	@UIEffect public Object execute(ExecutionEvent event) throws ExecutionException {
 		IWorkbenchPart part = HandlerUtil.getActivePart(event);
 		IObjectActionDelegate action = EditorPropertyTester.hasResourceSelection(part);
 		if (action == null) {

logviewer/de.anbos.eclipse.logviewer.plugin/src/de/anbos/eclipse/logviewer/plugin/file/document/LogDocument.java

 	 * to stop at the next possbile exit point.
 	 * @param monitor
 	 */
-	public void setMonitor(boolean monitorIn) {
+	@SafeEffect public void setMonitor(boolean monitorIn) {
 		if(monitorIn && !monitor) {
 			getStore().set(""); //$NON-NLS-1$
 			getTracker().set(""); //$NON-NLS-1$

logviewer/de.anbos.eclipse.logviewer.plugin/src/de/anbos/eclipse/logviewer/plugin/ui/menu/LocalPullDownMenu.java

 		actionList.add(FILELIST);
 	}
 
-	public void finalize() {
-		fillMenu(); // Colin Gordon: BUG? This seems like an application bug for sure, even if it's not a ui threading bug
+	@SafeEffect public void finalize() {
+		fillMenu(); // Colin Gordon: BUG: finalizers run on their own thread!  Even if fillMenu() doesn't really need to be UI, this is at least bizarre
 	}
 
 	public void menuAboutToShow(IMenuManager manager) {
 +15 (3:00): 10.  Largely marking things like JFaceResources and (shockingly) SWT Font as mostly safe
 +15 (3:15): 8.  A UI type, and marking FieldEditor.setPropertyChangeListener as taking a @UI listener
 +5 (3:20): 4.  Marked OpenWith as a UI type (plus extra safeeffects to work around postDirectSupertypes()).
++15 (3:35): 3.  One remaining is de facto safe though that may not be the design.  Another is a potentially safe call from a finalizer (it's at least an application weirdness, but will never cause problems because Eclipse never unloads plugins and the finalizer is on a menu).  The last is sticking a UI property change listener into the global jface property store, which seems okay for this application because the only code that touches the property store in this program is in the UI.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.