Skip to content

Commit 945480c

Browse files
committed
Don't ask platform for adapters from adapter factory to avoid overflow
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
1 parent 62b383c commit 945480c

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

AnyEditTools/src/de/loskutov/anyedit/ui/editor/EditorAdapterFactory.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ public Object getAdapter(Object adaptableObject, Class adapterType) {
6363
}
6464
}
6565
}
66-
if(adapterType == File.class){
67-
return EclipseUtils.getFile(adaptableObject, true);
68-
}
6966
return null;
7067
}
7168

AnyEditTools/src/de/loskutov/anyedit/util/EclipseUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ public static ITextFileBuffer getBuffer(IFile file) {
570570
}
571571

572572
@Nullable
573-
public static URI getURI(IEditorInput input){
573+
public static URI getURI(@Nullable IEditorInput input){
574574
if(input == null){
575575
return null;
576576
}
@@ -582,7 +582,7 @@ public static URI getURI(IEditorInput input){
582582
}
583583

584584
@Nullable
585-
public static File getFile(IEditorInput input) {
585+
public static File getFile(@Nullable IEditorInput input) {
586586
URI uri = getURI(input);
587587
if(uri == null){
588588
return null;
@@ -598,7 +598,7 @@ public static File getFile(IEditorInput input) {
598598
* @return may return null
599599
*/
600600
@Nullable
601-
public static File getLocalFile(URI uri) {
601+
public static File getLocalFile(@Nullable URI uri) {
602602
if (uri != null) {
603603
try {
604604
IFileStore store = EFS.getStore(uri);

0 commit comments

Comments
 (0)