Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix TISTUD-1449 Blocker: Debugger: After the debugger hits the breakp…

…oint the blue dots indicating the breakpoint disapppears
  • Loading branch information...
commit 9f93448e180f3c217b844e185f1f2c4233fe967d 1 parent 64d05c0
@sgtcoolguy sgtcoolguy authored
View
67 plugins/com.aptana.editor.common/src/com/aptana/editor/common/CommonAnnotationModel.java
@@ -10,6 +10,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import java.util.Map;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
@@ -20,6 +21,8 @@
import org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel;
import com.aptana.core.build.IProblem;
+import com.aptana.core.util.ArrayUtil;
+import com.aptana.core.util.CollectionsUtil;
/**
* Annotation Model for {@link IProblem}s. This model is used to draw annotations on the editor for
@@ -42,10 +45,10 @@ public CommonAnnotationModel(IResource resource)
/**
* Signals the end of problem reporting.
*
- * @param reportedProblems
- * the problems to report
+ * @param map
+ * the map of Marker types to collection of "markers/problems" to report
*/
- public void reportProblems(Collection<IProblem> reportedProblems)
+ public void reportProblems(Map<String, Collection<IProblem>> map)
{
if (fProgressMonitor != null && fProgressMonitor.isCanceled())
{
@@ -54,13 +57,19 @@ public void reportProblems(Collection<IProblem> reportedProblems)
boolean temporaryProblemsChanged = false;
- // Forcibly remove marker annotations now that we've reconciled...
+ // Forcibly remove marker annotations of any particular type we're managing now that we've reconciled...
try
{
IMarker[] markers = retrieveMarkers();
- for (IMarker marker : markers)
+ if (!ArrayUtil.isEmpty(markers))
{
- removeMarkerAnnotation(marker);
+ for (IMarker marker : markers)
+ {
+ if (map.containsKey(marker.getType()))
+ {
+ removeMarkerAnnotation(marker);
+ }
+ }
}
}
catch (CoreException e)
@@ -77,32 +86,36 @@ public void reportProblems(Collection<IProblem> reportedProblems)
fGeneratedAnnotations.clear();
}
- if (reportedProblems != null)
+ if (!CollectionsUtil.isEmpty(map))
{
-
- for (IProblem problem : reportedProblems)
+ for (Collection<IProblem> problems : map.values())
{
-
- if (fProgressMonitor != null && fProgressMonitor.isCanceled())
+ if (!CollectionsUtil.isEmpty(problems))
{
- break;
- }
-
- Position position = generatePosition(problem);
- if (position != null)
- {
-
- try
+ for (IProblem problem : problems)
{
- ProblemAnnotation annotation = new ProblemAnnotation(problem);
- addAnnotation(annotation, position, false);
- fGeneratedAnnotations.add(annotation);
- temporaryProblemsChanged = true;
- }
- catch (BadLocationException x)
- {
- // ignore invalid position
+ if (fProgressMonitor != null && fProgressMonitor.isCanceled())
+ {
+ break;
+ }
+
+ Position position = generatePosition(problem);
+ if (position != null)
+ {
+ try
+ {
+ ProblemAnnotation annotation = new ProblemAnnotation(problem);
+ addAnnotation(annotation, position, false);
+ fGeneratedAnnotations.add(annotation);
+
+ temporaryProblemsChanged = true;
+ }
+ catch (BadLocationException x)
+ {
+ // ignore invalid position
+ }
+ }
}
}
}
View
17 ...ins/com.aptana.editor.common/src/com/aptana/editor/common/text/reconciler/CommonReconcilingStrategy.java
@@ -202,7 +202,10 @@ protected void clearPositions(IProgressMonitor monitor)
*/
protected void updatePositions()
{
- fEditor.updateFoldingStructure(fPositions);
+ if (fEditor != null)
+ {
+ fEditor.updateFoldingStructure(fPositions);
+ }
}
private void reconcile(boolean initialReconcile)
@@ -372,18 +375,8 @@ private void reportProblems(ReconcileContext context, IProgressMonitor monitor)
CommonAnnotationModel caModel = (CommonAnnotationModel) model;
caModel.setProgressMonitor(monitor);
- // Collect all the problems into a single collection...
- Map<String, Collection<IProblem>> mapProblems = context.getProblems();
- Collection<IProblem> allProblems = new ArrayList<IProblem>();
- for (Collection<IProblem> problemsForMarkerType : mapProblems.values())
- {
- if (!CollectionsUtil.isEmpty(problemsForMarkerType))
- {
- allProblems.addAll(problemsForMarkerType);
- }
- }
// Now report them all to the annotation model!
- caModel.reportProblems(allProblems);
+ caModel.reportProblems(context.getProblems());
caModel.setProgressMonitor(null);
}
Please sign in to comment.
Something went wrong with that request. Please try again.