Package com.intellij.util

Examples of com.intellij.util.IncorrectOperationException


        int value;
        try {
            String text = element.getText();
            value = Integer.parseInt(text, text.startsWith("0") ? 8 : 10);
        } catch (NumberFormatException e) {
            throw new IncorrectOperationException("Invalid integer");
        }

        final String result = "0x" + Integer.toString(value, 16);
        final int start = element.getTextOffset();
        final int end = start + element.getTextLength();
View Full Code Here


        return findChildrenByClass(GoLiteralIdentifier.class);
    }

    @Override
    public PsiElement setName(@NotNull String name) throws IncorrectOperationException {
        throw new IncorrectOperationException("not implemented");
    }
View Full Code Here

    @Override
    protected void processIntention(@NotNull PsiElement element, Editor editor)
            throws IncorrectOperationException {
        GoIfStatement stmt = findParentOfType(element, GoIfStatement.class);
        if (stmt == null) {
            throw new IncorrectOperationException(GoIntentionsBundle.message("error.if.statement.not.found"));
        }

        PsiFile file = stmt.getContainingFile();
        if (file == null) {
            return;
View Full Code Here

                value = Integer.parseInt(text.substring(2), 16);
            } else {
                value = Integer.parseInt(text);
            }
        } catch (NumberFormatException e) {
            throw new IncorrectOperationException("Invalid integer");
        }

        final String result = "0" + Integer.toString(value, 8);
        final int start = element.getTextOffset();
        final int end = start + element.getTextLength();
View Full Code Here

                value = Integer.parseInt(text.substring(2), 16);
            } else {
                value = Integer.parseInt(text, 8);
            }
        } catch (NumberFormatException e) {
            throw new IncorrectOperationException("Invalid integer");
        }

        final String result = Integer.toString(value);
        final int start = element.getTextOffset();
        final int end = start + element.getTextLength();
View Full Code Here

        return processor.execute(this, state);
    }

    @Override
    public PsiElement setName(@NotNull String name) throws IncorrectOperationException {
        throw new IncorrectOperationException("Not implemented");
    }
View Full Code Here

    @Override
    public final PsiElement setName(@NotNull String newName) throws IncorrectOperationException{
        PsiElement nameElement = getNameElement();
        if(nameElement == null){           
            throw new IncorrectOperationException();
        }
        ASTNode nameNode = nameElement.getNode();
        nameNode.getTreeParent().replaceChild(nameNode,PbPsiUtil.createSimpleNodeWithText(newName,getProject()));
        return this;
    }
View Full Code Here

            }else{
                nameElement.getNode().getTreeParent().replaceChild(nameElement.getNode(),PbPsiUtil.createSimpleNodeWithText(newName,getProject()));
            }
            return this;
        }
        throw new IncorrectOperationException();
    }
View Full Code Here

            PsiElement newImportEl = this.getParent().replace(newEl);
            PsiElement newImportRefEl = newImportEl.getFirstChild();
            return newImportRefEl;
        }

        throw new IncorrectOperationException("Cannot bind to element: " + psiElement);
    }
View Full Code Here

      }
    }
  }

  int reenumerate(Data key) throws IOException {
    if (!canReEnumerate()) throw new IncorrectOperationException();
    return doEnumerate(key, false, true);
  }
View Full Code Here

TOP

Related Classes of com.intellij.util.IncorrectOperationException

Copyright © 2018 www.massapicom. 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.