forked from phoedos/pmd
few problems reported by Martin
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4304 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -98,7 +98,9 @@ public class EditorChangeListener implements PropertyChangeListener, ChangeListe
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
BaseDocument doc = Registry.getMostActiveDocument();
|
||||
if (doc == null) {
|
||||
scanner.cancel();
|
||||
if (scanner != null) {
|
||||
scanner.cancel();
|
||||
}
|
||||
}
|
||||
else if (!doc.equals(active)) {
|
||||
startScan (doc);
|
||||
|
@ -102,6 +102,9 @@ public class Scanner implements Runnable, DocumentListener {
|
||||
tabSize = foo.intValue();
|
||||
|
||||
DataObject object = NbEditorUtilities.getDataObject(doc);
|
||||
if (object == null) {
|
||||
return;
|
||||
}
|
||||
LineCookie cookie = ( LineCookie )object.getCookie( LineCookie.class );
|
||||
Line.Set lineset = cookie.getLineSet();
|
||||
List list = Collections.singletonList(object);
|
||||
|
Reference in New Issue
Block a user