Bug 1656 - Setting a breakpoint causes WRT Preview to refresh - was fixed
authorEugene Ostroukhov <eugeneo@symbian.org>
Mon, 08 Feb 2010 11:32:00 -0800
changeset 105 080d3ff46c86
parent 104 58b323842de3
child 106 4638f9d46d1f
Bug 1656 - Setting a breakpoint causes WRT Preview to refresh - was fixed
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/PreviewView.java
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/PreviewView.java	Mon Feb 08 11:14:10 2010 -0800
+++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/PreviewView.java	Mon Feb 08 11:32:00 2010 -0800
@@ -7,9 +7,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.net.URL;
 import java.util.Collection;
-import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
@@ -26,8 +24,6 @@
 import org.eclipse.core.resources.IWorkspaceRoot;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialogWithToggle;
@@ -39,7 +35,6 @@
 import org.eclipse.ui.part.MessagePage;
 import org.eclipse.ui.part.PageBook;
 import org.eclipse.ui.part.PageBookView;
-import org.osgi.framework.Bundle;
 import org.symbian.tools.wrttools.previewer.IWrtEditingPreferences;
 import org.symbian.tools.wrttools.previewer.PreviewerPlugin;
 import org.symbian.tools.wrttools.util.ProjectUtils;
@@ -51,7 +46,13 @@
 
 		public boolean visit(IResourceDelta delta) throws CoreException {
 			if (isRelevantResource(delta.getResource())) {
-				files.add((IFile) delta.getResource());
+				if ((delta.getFlags() & (IResourceDelta.CONTENT
+						| IResourceDelta.COPIED_FROM | IResourceDelta.ENCODING
+						| IResourceDelta.LOCAL_CHANGED
+						| IResourceDelta.MOVED_FROM | IResourceDelta.MOVED_TO
+						| IResourceDelta.MOVED_FROM | IResourceDelta.REPLACED | IResourceDelta.SYNC)) != 0) {
+					files.add((IFile) delta.getResource());
+				}
 			}
 			return true;
 		}