Commits

Colin Gordon committed bac8216

revisiting after lots of checker fixes

Comments (0)

Files changed (17)

logviewer/de.anbos.eclipse.logviewer.plugin/src/de/anbos/eclipse/logviewer/plugin/ConsoleFactory.java

 import org.eclipse.ui.console.IConsoleConstants;
 import org.eclipse.ui.console.IConsoleFactory;
 import org.eclipse.ui.console.IConsoleView;
+import guitypes.checkers.quals.*;
 
-public class ConsoleFactory implements IConsoleFactory {
+@UIType public class ConsoleFactory implements IConsoleFactory {
 
 	public void openConsole() {
 		LogViewer logView = null;

logviewer/de.anbos.eclipse.logviewer.plugin/src/de/anbos/eclipse/logviewer/plugin/LogViewer.java

 
 	// Inner Class -------------------------------------------------------------
 
-	private class ViewDocumentListener implements IDocumentListener {
+	@UIType private class ViewDocumentListener implements IDocumentListener {
 
             public void documentAboutToBeChanged(DocumentEvent documentevent) {
             }
             }
     }
 
-    private class TabSelectionListener implements SelectionListener {
+    @UIType private class TabSelectionListener implements SelectionListener {
 
 		/* (non-Javadoc)
 		 * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)

logviewer/de.anbos.eclipse.logviewer.plugin/src/de/anbos/eclipse/logviewer/plugin/action/delegate/CloseAllFilesActionDelegate.java

  * See the License for the specific language governing permissions
  * and limitations under the License.
  */
+import guitypes.checkers.quals.*;
 
-public class CloseAllFilesActionDelegate implements ILogViewerActionDelegate {
+@UIType public class CloseAllFilesActionDelegate implements ILogViewerActionDelegate {
 
 	// Public -----------------------------------------------------------------------
 	

logviewer/de.anbos.eclipse.logviewer.plugin/src/de/anbos/eclipse/logviewer/plugin/action/delegate/FileCloseActionDelegate.java

  * See the License for the specific language governing permissions
  * and limitations under the License.
  */
+import guitypes.checkers.quals.*;
 
-public class FileCloseActionDelegate implements ILogViewerActionDelegate {
+@UIType public class FileCloseActionDelegate implements ILogViewerActionDelegate {
 
 	/* (non-Javadoc)
 	 * @see de.anbos.eclipse.logviewer.plugin.action.delegate.ILogViewerActionDelegate#run(de.anbos.eclipse.logviewer.plugin.LogViewer, org.eclipse.swt.widgets.Shell)

logviewer/de.anbos.eclipse.logviewer.plugin/src/de/anbos/eclipse/logviewer/plugin/action/delegate/FileEncodingActionDelegate.java

 
 import de.anbos.eclipse.logviewer.plugin.LogViewer;
 import de.anbos.eclipse.logviewer.plugin.ui.EncodingDialog;
+import guitypes.checkers.quals.*;
 
 /*
  * Copyright (c) 2007 - 2011 by Michael Mimo Moratti
  * and limitations under the License.
  */
 
-public class FileEncodingActionDelegate implements ILogViewerActionDelegate {
+@UIType public class FileEncodingActionDelegate implements ILogViewerActionDelegate {
 
     // Attribute --------------------------------------------------------------------
     

logviewer/de.anbos.eclipse.logviewer.plugin/src/de/anbos/eclipse/logviewer/plugin/action/delegate/HistoryFileOpenActionDelegate.java

  * See the License for the specific language governing permissions
  * and limitations under the License.
  */
+import guitypes.checkers.quals.*;
 
-public class HistoryFileOpenActionDelegate implements ILogViewerActionDelegate {
+@UIType public class HistoryFileOpenActionDelegate implements ILogViewerActionDelegate {
 
 	// Attribute ---------------------------------------------------------------
 	

logviewer/de.anbos.eclipse.logviewer.plugin/src/de/anbos/eclipse/logviewer/plugin/action/delegate/PreferencesActionDelegate.java

 import org.eclipse.ui.handlers.IHandlerService;
 
 import de.anbos.eclipse.logviewer.plugin.LogViewer;
+import guitypes.checkers.quals.*;
 
 
-public class PreferencesActionDelegate implements ILogViewerActionDelegate {
+@UIType public class PreferencesActionDelegate implements ILogViewerActionDelegate {
 
 	public void run(LogViewer view, Shell shell) {
 		

logviewer/de.anbos.eclipse.logviewer.plugin/src/de/anbos/eclipse/logviewer/plugin/action/delegate/RefreshCurrentFileActionDelegate.java

  * See the License for the specific language governing permissions
  * and limitations under the License.
  */
+import guitypes.checkers.quals.*;
 
-public class RefreshCurrentFileActionDelegate implements ILogViewerActionDelegate {
+@UIType public class RefreshCurrentFileActionDelegate implements ILogViewerActionDelegate {
 
     // Public -----------------------------------------------------------------------
     

logviewer/de.anbos.eclipse.logviewer.plugin/src/de/anbos/eclipse/logviewer/plugin/action/delegate/StartTailOnAllFileActionDelegate.java

 import org.eclipse.swt.widgets.Shell;
 
 import de.anbos.eclipse.logviewer.plugin.LogViewer;
+import guitypes.checkers.quals.*;
 
-public class StartTailOnAllFileActionDelegate implements ILogViewerActionDelegate {
+@UIType public class StartTailOnAllFileActionDelegate implements ILogViewerActionDelegate {
 
     // Public ------------------------------------------------------------------
     

logviewer/de.anbos.eclipse.logviewer.plugin/src/de/anbos/eclipse/logviewer/plugin/action/delegate/StartTailOnCurrentFileActionDelegate.java

  * and limitations under the License.
  */
 
-public class StartTailOnCurrentFileActionDelegate implements ILogViewerActionDelegate {
+import guitypes.checkers.quals.*;
+@UIType public class StartTailOnCurrentFileActionDelegate implements ILogViewerActionDelegate {
 
     // Public -----------------------------------------------------------------------
     

logviewer/de.anbos.eclipse.logviewer.plugin/src/de/anbos/eclipse/logviewer/plugin/action/delegate/StopTailOnAllFileActionDelegate.java

 import org.eclipse.swt.widgets.Shell;
 
 import de.anbos.eclipse.logviewer.plugin.LogViewer;
+import guitypes.checkers.quals.*;
 
-public class StopTailOnAllFileActionDelegate implements ILogViewerActionDelegate {
+@UIType public class StopTailOnAllFileActionDelegate implements ILogViewerActionDelegate {
 
     // Public ------------------------------------------------------------------
     

logviewer/de.anbos.eclipse.logviewer.plugin/src/de/anbos/eclipse/logviewer/plugin/action/delegate/StopTailOnCurrentFileActionDelegate.java

  * and limitations under the License.
  */
 
-public class StopTailOnCurrentFileActionDelegate implements ILogViewerActionDelegate {
+import guitypes.checkers.quals.*;
+@UIType public class StopTailOnCurrentFileActionDelegate implements ILogViewerActionDelegate {
 
     // Public -----------------------------------------------------------------------
     

logviewer/de.anbos.eclipse.logviewer.plugin/src/de/anbos/eclipse/logviewer/plugin/action/delegate/TabRenameActionDelegate.java

  * See the License for the specific language governing permissions
  * and limitations under the License.
  */
+import guitypes.checkers.quals.*;
 
-public class TabRenameActionDelegate implements ILogViewerActionDelegate {
+@UIType public class TabRenameActionDelegate implements ILogViewerActionDelegate {
 
 	// Public ------------------------------------------------------------------
 	

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

 
 	}
 
-	@UIEffect public Object execute(ExecutionEvent event) throws ExecutionException {
+	public Object execute(ExecutionEvent event) throws ExecutionException {
 		LogFileViewer viewer = ((LogViewer)HandlerUtil.getActivePart(event)).getViewer();
 		StyledText text = viewer.getActualViewer().getTextWidget();
 		text.copy();

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

 
 	}
 
-	@UIEffect public Object execute(ExecutionEvent event) throws ExecutionException {
+	public Object execute(ExecutionEvent event) throws ExecutionException {
 		ResourceBundle bundle = LogViewerPlugin.getDefault().getResourceBundle();
 		if (action == null)
 			action = new FindReplaceAction(bundle,"dialog.findreplace.",(LogViewer)HandlerUtil.getActivePart(event));

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

 		// TODO Auto-generated method stub
 	}
 
-	@UIEffect public Object execute(ExecutionEvent event) throws ExecutionException {
+	public Object execute(ExecutionEvent event) throws ExecutionException {
 		IWorkbenchPart part = HandlerUtil.getActivePart(event);
 		IObjectActionDelegate action = EditorPropertyTester.hasResourceSelection(part);
 		if (action == null) {
 +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.
++15 (3:50): 3 - some checker & stub file fixes found more error reports, now addressed with effect annotations.