@Nullable
public PsiFile getCachedPsiFile(@NotNull VirtualFile vFile) {
ApplicationManager.getApplication().assertReadAccessAllowed();
- LOG.assertTrue(vFile.isValid());
+ LOG.assertTrue(vFile.isValid(), "Invalid file");
- LOG.assertTrue(!myDisposed, "Already disposed");
+ if (myDisposed) {
+ LOG.error("Project is already disposed: " + myManager.getProject());
+ }
if (!myInitialized) return null;
dispatchPendingEvents();
return ((INativeFileType) type).openFileInAssociatedApplication(project, myFile);
}
- return navigateInRequestedEditor() || navigateInAnyFileEditor(project, focusEditor);
+ return navigateInRequestedEditor() || navigateInAnyFileEditor(project, requestFocus);
-
}
private boolean navigateInRequestedEditor() {
final ProjectManagerEx projectManager = ProjectManagerEx.getInstanceEx();
Project project = null;
- Ref<Boolean> cancelled = new Ref<Boolean>();
if (projectDir.exists()) {
try {
-
- project = ((ProjectManagerImpl) projectManager).convertAndLoadProject(baseDir.getPath(), cancelled);
+ for (ProjectOpenProcessor processor : ProjectOpenProcessor.EXTENSION_POINT_NAME.getExtensions()) {
+ processor.refreshProjectFiles(projectDir);
+ }
++
+ project = ((ProjectManagerImpl) projectManager).convertAndLoadProject(baseDir.getPath());
}
catch (Exception e) {
// ignore
return Collections.emptyMap();
}
};
+ private static final long serialVersionUID = -2632269270151455493L;
private final Map<K, Collection<V>> myMap;
-
private Collection<V> values;
public MultiMap() {
private static final Color ACTIVE_HEADER_COLOR = new Color(160, 186, 213);
private static final Color INACTIVE_HEADER_COLOR = new Color(128, 128, 128);
private static final Color BORDER_COLOR = Color.LIGHT_GRAY;
- public static Color AQUA_SEPARATOR_FOREGROUND_COLOR = new Color(190, 190, 190);
- public static Color AQUA_SEPARATOR_BACKGROUND_COLOR = new Color(240, 240, 240);
+
+ public static final Color AQUA_SEPARATOR_FOREGROUND_COLOR = new Color(190, 190, 190);
+ public static final Color AQUA_SEPARATOR_BACKGROUND_COLOR = new Color(240, 240, 240);
+ public static final Color TRANSPARENT_COLOR = new Color(0, 0, 0, 0);
- public static final int DEFAULT_HGAP = 10;
- public static final int DEFAULT_VGAP = 5;
+ public static final int DEFAULT_HGAP = 8;
+ public static final int DEFAULT_VGAP = 4;
public static final int LARGE_HGAP = 30;
public static final int LARGE_VGAP = 20;
import java.util.regex.Pattern;
public class CommentSplitter extends BaseSplitter {
- private static final Pattern HTML = Pattern.compile("<(\\S+?).*?>(.*?)</\\1>");
++ private static final Pattern HTML = Pattern.compile("<(\\S+?)[^<>]*?>(.*?)</\\1>");
+
+ private static final CommentSplitter INSTANCE = new CommentSplitter();
+
+ public static CommentSplitter getInstance() {
+ return INSTANCE;
+ }
- private static final Pattern HTML = Pattern.compile("<(\\S+?)[^<>]*?>(.*?)</\\1>");
-
-
- public List<CheckArea> split(@Nullable String text, @NotNull TextRange range) {
+ @Override
+ public void split(@Nullable String text, @NotNull TextRange range, Consumer<TextRange> consumer) {
if (text == null || StringUtil.isEmpty(text)) {
- return null;
+ return;
}
List<TextRange> toCheck = excludeByPattern(text, range, HTML, 2);