Skip to content

Commit b07cf45

Browse files
authored
Merge pull request #1393 from ruudk/fix-crash
Twig settings are not available while indexing
2 parents e951000 + e8248d0 commit b07cf45

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main/java/fr/adrienbrault/idea/symfony2plugin/ui/TwigSettingsForm.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
import com.intellij.openapi.options.Configurable;
44
import com.intellij.openapi.options.ConfigurationException;
5+
import com.intellij.openapi.project.DumbService;
56
import com.intellij.openapi.project.Project;
7+
import com.intellij.openapi.ui.DialogWrapper;
68
import com.intellij.ui.ToolbarDecorator;
79
import com.intellij.ui.table.TableView;
810
import com.intellij.util.ui.ColumnInfo;
@@ -50,6 +52,12 @@ private void attachItems() {
5052
return;
5153
}
5254

55+
if (DumbService.getInstance(project).isDumb()) {
56+
this.tableView.getEmptyText().setText("Not available while indexing. Please re-open this screen when ready.");
57+
58+
return;
59+
}
60+
5361
List<TwigPath> sortableLookupItems = new ArrayList<>(TwigUtil.getTwigNamespaces(this.project, true));
5462
Collections.sort(sortableLookupItems);
5563

0 commit comments

Comments
 (0)