This commit is contained in:
Alexey Kudravtsev
2012-04-02 15:31:52 +04:00
parent 06e9e4096e
commit 49814b5f4a
6 changed files with 16 additions and 10 deletions
@@ -333,8 +333,12 @@ public class EvaluatorBuilderImpl implements EvaluatorBuilder {
}
// constructs binary evaluator handling unboxing and numeric promotion issues
private static BinaryExpressionEvaluator createBinaryEvaluator(
Evaluator lResult, final PsiType lType, Evaluator rResult, final PsiType rType, final IElementType operation, final @NotNull PsiType expressionExpectedType) {
private static BinaryExpressionEvaluator createBinaryEvaluator(Evaluator lResult,
PsiType lType,
Evaluator rResult,
@NotNull PsiType rType,
@NotNull IElementType operation,
@NotNull PsiType expressionExpectedType) {
// handle unboxing if neccesary
if (isUnboxingInBinaryExpressionApplicable(lType, rType, operation)) {
if (rType instanceof PsiClassType && UnBoxingEvaluator.isTypeUnboxable(rType.getCanonicalText())) {
@@ -71,7 +71,7 @@ public class VirtualFileManagerImpl extends VirtualFileManagerEx {
bus.connect().subscribe(VFS_CHANGES, new BulkVirtualFileListenerAdapter(myVirtualFileListenerMulticaster.getMulticaster()));
}
public void registerFileSystem(VirtualFileSystem fileSystem) {
public void registerFileSystem(@NotNull VirtualFileSystem fileSystem) {
myCollector.addExplicitExtension(fileSystem.getProtocol(), fileSystem);
if (!(fileSystem instanceof CachingVirtualFileSystem)) {
fileSystem.addVirtualFileListener(myVirtualFileListenerMulticaster.getMulticaster());
@@ -79,7 +79,7 @@ public class VirtualFileManagerImpl extends VirtualFileManagerEx {
myPhysicalFileSystems.add(fileSystem);
}
public void unregisterFileSystem(VirtualFileSystem fileSystem) {
public void unregisterFileSystem(@NotNull VirtualFileSystem fileSystem) {
myCollector.removeExplicitExtension(fileSystem.getProtocol(), fileSystem);
fileSystem.removeVirtualFileListener(myVirtualFileListenerMulticaster.getMulticaster());
myPhysicalFileSystems.remove(fileSystem);
@@ -121,7 +121,7 @@ public class LineMarkersPass extends ProgressableTextEditorHighlightingPass impl
myMarkers = mergeLineMarkers(lineMarkers);
}
private List<LineMarkerInfo> mergeLineMarkers(List<LineMarkerInfo> markers) {
private List<LineMarkerInfo> mergeLineMarkers(@NotNull List<LineMarkerInfo> markers) {
List<MergeableLineMarkerInfo> forMerge = new ArrayList<MergeableLineMarkerInfo>();
final Iterator<LineMarkerInfo> iterator = markers.iterator();
while (iterator.hasNext()) {
@@ -154,7 +154,7 @@ public class LineMarkersPass extends ProgressableTextEditorHighlightingPass impl
return result;
}
public static List<LineMarkerProvider> getMarkerProviders(Language language, Project project) {
public static List<LineMarkerProvider> getMarkerProviders(@NotNull Language language, @NotNull Project project) {
return DumbService.getInstance(project).filterByDumbAwareness(LineMarkerProviders.INSTANCE.allForLanguage(language));
}
@@ -239,6 +239,7 @@ public class LineMarkersPass extends ProgressableTextEditorHighlightingPass impl
}
}
@NotNull
public Collection<LineMarkerInfo> queryLineMarkers() {
if (myFile.getNode() == null) {
// binary file? see IDEADEV-2809
@@ -255,7 +256,7 @@ public class LineMarkersPass extends ProgressableTextEditorHighlightingPass impl
}
@NotNull
public static LineMarkerInfo createMethodSeparatorLineMarker(PsiElement startFrom, EditorColorsManager colorsManager) {
public static LineMarkerInfo createMethodSeparatorLineMarker(@NotNull PsiElement startFrom, @NotNull EditorColorsManager colorsManager) {
LineMarkerInfo info = new LineMarkerInfo<PsiElement>(
startFrom,
startFrom.getTextRange(),
@@ -117,7 +117,7 @@ public final class QuickFixAction {
}
private static void addAvailableActionsForGroups(@NotNull HighlightInfo info,
Editor editor,
@NotNull Editor editor,
@NotNull PsiFile file,
@NotNull List<HighlightInfo.IntentionActionDescriptor> outList,
int group,
@@ -278,7 +278,8 @@ public class SelfElementInfo implements SmartPointerElementInfo {
@Override
public int elementHashCode() {
return myVirtualFile == null ? 0 : myVirtualFile.hashCode();
VirtualFile virtualFile = myVirtualFile;
return virtualFile == null ? 0 : virtualFile.hashCode();
}
@Override
@@ -41,7 +41,7 @@ public class TestDataProvider implements DataProvider {
@Override
public Object getData(@NonNls String dataId) {
if (myProject.isDisposed()) {
throw new RuntimeException("TestDataProvider is already disposed.\n" +
throw new RuntimeException("TestDataProvider is already disposed for " + myProject + "\n" +
"If you closed a project in test, please reset IdeaTestApplication.setDataProvider.");
}