throws CoreException, OperationCanceledException
{
String pack = getTargetPackage();
// check if file is from haxe lib
HaxeLibProject project = Activator.getProjectManager().getHaxeLib();
CodeFile file = project.getFile(pack);
if (file != null)
{
return RefactoringStatus.createErrorStatus("Can't edit library file");
}
// available for editing
HaxeProject proj = Activator.getProjectManager().getCurrentHaxeProject();
file = proj.getFile(pack);
if (file.getRealFile().getResourceAttributes().isReadOnly())
{
return RefactoringStatus.createErrorStatus("File isn't editable");
}
return new RefactoringStatus();