Examples of ensureFilesWritable()


Examples of com.intellij.openapi.vfs.ReadonlyStatusHandler.ensureFilesWritable()

    protected static boolean isFileReadOnly( @NotNull Project project, @NotNull PsiFile file )
    {
        VirtualFile virtualFile = file.getVirtualFile();
        ReadonlyStatusHandler readonlyStatusHandler = ReadonlyStatusHandler.getInstance( project );
        ReadonlyStatusHandler.OperationStatus operationStatus =
            readonlyStatusHandler.ensureFilesWritable( virtualFile );
        return operationStatus.hasReadonlyFiles();
    }

    @Nullable
    private PsiElement findMatchingElement( @NotNull PsiFile file, @NotNull Editor editor )
View Full Code Here

Examples of com.intellij.openapi.vfs.ReadonlyStatusHandler.ensureFilesWritable()

    @Override
    public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
        final VirtualFile virtualFile = file.getVirtualFile();
        final ReadonlyStatusHandler readonlyStatusHandler = ReadonlyStatusHandler.getInstance(project);
        final ReadonlyStatusHandler.OperationStatus operationStatus = readonlyStatusHandler.ensureFilesWritable(virtualFile);
        if (operationStatus.hasReadonlyFiles()) {
            return;
        }

        PsiElement element = findMatchingElement(file, editor);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.