mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 10:46:02 +02:00
The method ICElement.getResource() do not throw an Exception.
This commit is contained in:
parent
ee5e73d5fe
commit
0dfb3bd0ef
3 changed files with 22 additions and 32 deletions
|
@ -102,10 +102,7 @@ class CViewDragAdapter extends DragSourceAdapter {
|
||||||
IResource res = null;
|
IResource res = null;
|
||||||
if (next instanceof ICElement) {
|
if (next instanceof ICElement) {
|
||||||
ICElement celement = (ICElement)next;
|
ICElement celement = (ICElement)next;
|
||||||
try {
|
|
||||||
res = celement.getResource();
|
res = celement.getResource();
|
||||||
} catch (CModelException e) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (res == null) {
|
if (res == null) {
|
||||||
event.doit = false;
|
event.doit = false;
|
||||||
|
|
|
@ -112,7 +112,6 @@ public class CDocumentProvider extends FileDocumentProvider implements IWorkingC
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBuffer createBuffer(IOpenable owner) {
|
public IBuffer createBuffer(IOpenable owner) {
|
||||||
try {
|
|
||||||
if (owner instanceof IWorkingCopy) {
|
if (owner instanceof IWorkingCopy) {
|
||||||
|
|
||||||
IWorkingCopy unit= (IWorkingCopy) owner;
|
IWorkingCopy unit= (IWorkingCopy) owner;
|
||||||
|
@ -138,9 +137,6 @@ public class CDocumentProvider extends FileDocumentProvider implements IWorkingC
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (CModelException e) {
|
|
||||||
return DocumentAdapter.NULL;
|
|
||||||
}
|
|
||||||
return DocumentAdapter.NULL;
|
return DocumentAdapter.NULL;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -125,10 +125,7 @@ public class EditorUtility {
|
||||||
Process objdump = null;
|
Process objdump = null;
|
||||||
IPath path;
|
IPath path;
|
||||||
IResource file = null;
|
IResource file = null;
|
||||||
try {
|
|
||||||
file = bin.getResource();
|
file = bin.getResource();
|
||||||
} catch (CModelException e1) {
|
|
||||||
}
|
|
||||||
if (file == null)
|
if (file == null)
|
||||||
return store;
|
return store;
|
||||||
path = file.getLocation();
|
path = file.getLocation();
|
||||||
|
|
Loading…
Add table
Reference in a new issue