Skip to content

Commit 3804165

Browse files
committed
Fix validation bug when file is not opened.
1 parent bfb0706 commit 3804165

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

eclipse/jsdt/ts.eclipse.ide.jsdt.ui/src/ts/eclipse/ide/jsdt/internal/ui/validation/TypeScriptDocumentRegionProcessor.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
package ts.eclipse.ide.jsdt.internal.ui.validation;
1212

1313
import org.eclipse.core.resources.IResource;
14-
import org.eclipse.core.runtime.CoreException;
1514
import org.eclipse.jface.text.IDocument;
1615
import org.eclipse.jface.text.Region;
1716
import org.eclipse.jface.text.reconciler.DirtyRegion;
@@ -140,22 +139,24 @@ protected void setEntireDocumentDirty(IDocument document) {
140139
}
141140
super.setEntireDocumentDirty(document);
142141
}
143-
142+
144143
@Override
145-
protected void endProcessing() {
144+
protected void endProcessing() {
146145
super.endProcessing();
147146
// Refresh navigation bar/tree used for outline
148147
if (resource != null) {
149148
try {
150149
IIDETypeScriptProject tsProject = TypeScriptResourceUtil.getTypeScriptProject(resource.getProject());
151150
if (tsProject != null) {
152151
IIDETypeScriptFile tsFile = tsProject.getOpenedFile(resource);
153-
tsFile.refreshNavBar();
152+
if (tsFile != null) {
153+
tsFile.refreshNavBar();
154+
}
154155
}
155156
} catch (Exception e) {
156157
// TODO Auto-generated catch block
157158
e.printStackTrace();
158-
}
159+
}
159160
}
160161
}
161162
}

0 commit comments

Comments
 (0)