public boolean isModifiable(Object element)
{
if(element instanceof FileStoreEditorInput)
{
FileStoreEditorInput input = (FileStoreEditorInput)element;
File file = new File(input.getURI().getPath());
return file.canWrite();
}
if(!isStateValidated(element))
{
if (element instanceof IFileEditorInput)
{
return true;
}
}
if(element instanceof CFJavaFileEditorInput)
{
CFJavaFileEditorInput input = (CFJavaFileEditorInput)element;
return input.getPath(input).toFile().canWrite();
}
if(element instanceof RemoteFileEditorInput)
{
RemoteFileEditorInput input = (RemoteFileEditorInput)element;
return input.canWrite();
}
return super.isModifiable(element);
}