Community
Participate
Working Groups
build 20021210 The linked resource ui will eventually allow creating linked resource using non- existent path variables. In that case IResource.getLocation will return null. ExternalEditor.open should test this condition. See bug 28303.
Also check ExternalEditor.openWithUserDefinedProgram, EditorManager.openSystemEditor, OleEditor.setResource. They aren't necessarily a problem but they don't check getLocation() for null.
Fixed EditorManager and ExternalEditor. Assigned to Tod to check OLEEditor.
*** Bug 29492 has been marked as a duplicate of this bug. ***
*** Bug 29493 has been marked as a duplicate of this bug. ***
The OLEEditor is completely useless without the java.io.File - swt cannot handle this case at all. If there is no File then we should not open this editor at all. This test is not going to be suffienct anyways. It is currently possible to have a location in a file but no valid file associated with it. THis will fall through and create an exception. STEPS 1) Create a file linked to a bogus variable. 2) Open it - getLocation will return a value but the file will still not exist.
I have added the following check to OLEEditor //Cannot create this with a file and no physical location if(!new File(file.getLocation().toOSString()).exists()) throw new PartInitException( WorkbenchMessages.format ("OleEditor.noFileInput", new Object[] { file.getLocation() })); //$NON-NLS-1$
Fixed in build >20020122
Marking as closed.