This commit is contained in:
Alexey Kudravtsev
2018-11-20 18:42:41 +03:00
parent 294da0388f
commit 92a5e18746
3 changed files with 9 additions and 6 deletions
@@ -551,7 +551,7 @@ public class FileReference implements PsiFileReference, FileReferenceOwner, PsiP
@Override
public String getUnresolvedMessagePattern() {
return LangBundle.message("error.cannot.resolve")
+ " " + (LangBundle.message(isLast() ? "terms.file" : "terms.directory"))
+ " " + LangBundle.message(isLast() ? "terms.file" : "terms.directory")
+ " '" + StringUtil.escapePattern(decode(getCanonicalText())) + "'";
}
@@ -578,7 +578,7 @@ public class FileReference implements PsiFileReference, FileReferenceOwner, PsiP
return myFileReferenceSet.getLastReference();
}
static class MyResolver implements ResolveCache.PolyVariantContextResolver<FileReference> {
private static class MyResolver implements ResolveCache.PolyVariantContextResolver<FileReference> {
static final MyResolver INSTANCE = new MyResolver();
@NotNull
@@ -94,7 +94,7 @@ public class KeyedExtensionCollector<T, KeyT> {
Extensions.getRootArea().addAvailabilityListener(epName, myExtensionPointAvailabilityListener);
}
public KeyedExtensionCollector(@NonNls @NotNull String epName, Disposable parentDisposable) {
public KeyedExtensionCollector(@NonNls @NotNull String epName, @NotNull Disposable parentDisposable) {
this(epName);
Disposer.register(parentDisposable, new Disposable() {
@Override
@@ -95,10 +95,12 @@ public class AsyncEditorLoader {
* to be (optionally) called on EDT
* @see AsyncEditorLoader#scheduleLoading()
*/
@NotNull
final Future<Runnable> continuationFuture;
@NotNull
final Future<?> totalProgressFuture;
private LoadingProgress(Future<Runnable> future, Future<?> progressFuture) {
private LoadingProgress(@NotNull Future<Runnable> future, @NotNull Future<?> progressFuture) {
continuationFuture = future;
totalProgressFuture = progressFuture;
}
@@ -185,11 +187,12 @@ public class AsyncEditorLoader {
!ApplicationManager.getApplication().isWriteAccessAllowed();
}
private static <T> T resultInTimeOrNull(Future<T> future, long timeMs) {
private static <T> T resultInTimeOrNull(@NotNull Future<T> future, long timeMs) {
try {
return future.get(timeMs, TimeUnit.MILLISECONDS);
}
catch (InterruptedException | TimeoutException ignored) {}
catch (InterruptedException | TimeoutException ignored) {
}
catch (ExecutionException e) {
throw new RuntimeException(e);
}