From: <sh...@us...> - 2009-03-09 16:38:54
|
Revision: 14742 http://jedit.svn.sourceforge.net/jedit/?rev=14742&view=rev Author: shlomy Date: 2009-03-09 16:38:48 +0000 (Mon, 09 Mar 2009) Log Message: ----------- Repaint all text areas after adding/removing markers. Modified Paths: -------------- plugins/MarkerSets/trunk/src/marker/MarkerSet.java plugins/MarkerSets/trunk/src/marker/MarkerSetsPlugin.java Modified: plugins/MarkerSets/trunk/src/marker/MarkerSet.java =================================================================== --- plugins/MarkerSets/trunk/src/marker/MarkerSet.java 2009-03-09 13:53:34 UTC (rev 14741) +++ plugins/MarkerSets/trunk/src/marker/MarkerSet.java 2009-03-09 16:38:48 UTC (rev 14742) @@ -4,6 +4,10 @@ import java.util.Collections; import java.util.Vector; +import org.gjt.sp.jedit.jEdit; +import org.gjt.sp.jedit.textarea.JEditTextArea; +import org.gjt.sp.jedit.visitors.JEditVisitor; +import org.gjt.sp.jedit.visitors.JEditVisitorAdapter; import org.gjt.sp.util.SyntaxUtilities; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -47,10 +51,12 @@ if (markers.contains(marker)) return; markers.add(marker); + repaintAllTextAreas(); } public void remove(FileMarker marker) { markers.remove(marker); + repaintAllTextAreas(); } @SuppressWarnings("unchecked") @@ -95,4 +101,14 @@ for (int i = 0; i < markers.size(); i++) markers.get(i).exportXml(setNode); } + + private void repaintAllTextAreas() + { + jEdit.visit(new JEditVisitorAdapter() { + @Override + public void visit(JEditTextArea textArea) { + textArea.repaint(); + } + }); + } } Modified: plugins/MarkerSets/trunk/src/marker/MarkerSetsPlugin.java =================================================================== --- plugins/MarkerSets/trunk/src/marker/MarkerSetsPlugin.java 2009-03-09 13:53:34 UTC (rev 14741) +++ plugins/MarkerSets/trunk/src/marker/MarkerSetsPlugin.java 2009-03-09 16:38:48 UTC (rev 14742) @@ -317,7 +317,6 @@ notifyChange(Event.MARKER_ADDED, m); else notifyChange(Event.MARKER_REMOVED, m); - ta.repaint(); exportXml(xmlFile); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |