|
|
@ -75,21 +75,7 @@ namespace SharpRefactoring |
|
|
|
if (fileName == null) |
|
|
|
if (fileName == null) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
IDocument document; |
|
|
|
IDocument document = DocumentUtilitites.LoadDocumentFromBuffer(ParserService.GetParseableFileContent(fileName)); |
|
|
|
ITextEditorProvider provider = FileService.GetOpenFile(fileName) as ITextEditorProvider; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (provider == null) { |
|
|
|
|
|
|
|
if (!File.Exists(fileName)) |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
document = DocumentUtilitites.LoadDocumentFromBuffer(new StringTextBuffer(File.ReadAllText(fileName))); |
|
|
|
|
|
|
|
} catch (IOException) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
document = provider.TextEditor.Document; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool isAutomatic = false; |
|
|
|
bool isAutomatic = false; |
|
|
|
|
|
|
|
|
|
|
|
if (property.CanGet) { |
|
|
|
if (property.CanGet) { |
|
|
|