Java Code Examples for com.intellij.util.IncorrectOperationException

The following are top voted examples for showing how to use com.intellij.util.IncorrectOperationException. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: intellij-csv-validator   File: CsvIntentionHelper.java   Source Code and License 6 votes vote down vote up
public static void unquoteValue(@NotNull Project project, @NotNull PsiElement element) {
    try {
        Document document = PsiDocumentManager.getInstance(project).getDocument(element.getContainingFile());
        List<Integer> quotePositions = new ArrayList<>();

        element = getParentFieldElement(element);
        if (getElementType(element.getFirstChild()) == CsvTypes.QUOTE) {
            quotePositions.add(element.getFirstChild().getTextOffset());
        }
        if (getElementType(element.getLastChild()) == CsvTypes.QUOTE) {
            quotePositions.add(element.getLastChild().getTextOffset());
        }
        String text = removeQuotes(document.getText(), quotePositions);
        document.setText(text);
    } catch (IncorrectOperationException e) {
        LOG.error(e);
    }
}
 
Example 2
Project: AppleScript-IDEA   File: AbstractAppleScriptHandlerCall.java   Source Code and License 6 votes vote down vote up
@Override
public PsiElement handleElementRename(String newElementName) throws IncorrectOperationException {
  //todo implement this via rename refactor: RenamePsiElementProcessor & RenameHandler for each distinct selector
  final int mySelectorParts = getArguments().size();
  final String[] newSelectorParts = newElementName.split(":");
  if (newSelectorParts.length == mySelectorParts) {
    for (int index = 0; index < mySelectorParts; index++) {
      final AppleScriptIdentifier myId = getArguments().get(index).getArgumentSelector().getSelectorIdentifier();
      final AppleScriptIdentifier newId = AppleScriptPsiElementFactory.createIdentifierFromText(getProject(),
              newSelectorParts[index]);
      if (newId != null && myId != null) {
        myId.replace(newId);
      }
    }
  } else {
    final AppleScriptIdentifier myIdentifier = getArguments().get(0).getArgumentSelector().getSelectorIdentifier();
    final AppleScriptIdentifier identifierNew = AppleScriptPsiElementFactory.createIdentifierFromText(getProject(),
            newElementName);
    if (identifierNew != null && myIdentifier != null) {
      myIdentifier.replace(identifierNew);
    }
  }
  return AbstractAppleScriptHandlerCall.this;
}
 
Example 3
Project: AppleScript-IDEA   File: AppleScriptHandlerInterleavedParameters.java   Source Code and License 6 votes vote down vote up
@Override
public PsiElement setName(@NonNls @NotNull String newElementName) throws IncorrectOperationException {
  //todo implement this via rename refactor: RenamePsiElementProcessor & RenameHandler for each distinct selector
  final int selectors = getParameters().size();
  final String[] selectorNames = newElementName.split(":");
  if (selectorNames.length == selectors) {
    for (int index = 0; index < selectors; index++) {
      AppleScriptIdentifier myId = getParameters().get(index).getSelectorNameIdentifier();
      final AppleScriptIdentifier idNew = AppleScriptPsiElementFactory.createIdentifierFromText(getProject(), selectorNames[index]);
      if (idNew != null) {
        myId.replace(idNew);
      }
    }
  } else {
    AppleScriptIdentifier myIdentifier = getParameters().get(0).getSelectorNameIdentifier();
    final AppleScriptIdentifier identifierNew = AppleScriptPsiElementFactory.createIdentifierFromText(getProject(), newElementName);
    if (identifierNew != null) {
      myIdentifier.replace(identifierNew);
    }
  }
  return this;
}
 
Example 4
Project: manifold-ij   File: ManAugmentProvider.java   Source Code and License 6 votes vote down vote up
private PsiMethod makePsiMethod( AbstractSrcMethod method, PsiClass psiClass )
{
  PsiElementFactory elementFactory = JavaPsiFacade.getInstance( psiClass.getProject() ).getElementFactory();
  StringBuilder sb = new StringBuilder();
  method.render( sb, 0 );
  try
  {
    return elementFactory.createMethodFromText( sb.toString(), psiClass );
  }
  catch( IncorrectOperationException ioe )
  {
    // the text of the method does not conform to method grammar, probably being edited in an IJ editor,
    // ignore these since the editor provides error information
    return null;
  }
}
 
Example 5
Project: data-mediator   File: PropertyProcessor.java   Source Code and License 6 votes vote down vote up
private PsiClass createJavaFile(String javaFileName, @NonNls String text) {
    PsiJavaFile psiJavaFile = (PsiJavaFile) PsiFileFactory.getInstance(mPsiClass.getProject()).createFileFromText(
            javaFileName + "." + JavaFileType.INSTANCE.getDefaultExtension(),
            JavaFileType.INSTANCE, text);
    PsiClass[] classes = psiJavaFile.getClasses();
    if (classes.length != 1) {
        throw new IncorrectOperationException("Incorrect class '" + text + "'");
    } else {
        PsiClass pc = classes[0];
        if (pc == null) {
            throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null",
                    "com/intellij/psi/impl/PsiJavaParserFacadeImpl", "createJavaFile"));
        } else {
            return pc;
        }
    }
}
 
Example 6
Project: greycat-idea-plugin   File: GCMNewFileAction.java   Source Code and License 6 votes vote down vote up
@Nullable
@Override
protected PsiElement doCreate(PsiDirectory psiDirectory, String parameterName, String typeName) throws IncorrectOperationException {
    GCMTemplatesFactory.Template template = GCMTemplatesFactory.Template.GreyCatModel;
    String fileName = fileNameFromTypeName(typeName, parameterName);
    StringBuilder sample = new StringBuilder();
    sample.append("class Cloud {\n");
    sample.append("    att name : String\n");
    sample.append("    rel nodes : Node\n");
    sample.append("}\n");
    sample.append("class Node {\n");
    sample.append("    att name : String\n");
    sample.append("    rel softwares : Software\n");
    sample.append("    index indexedSoftware : Software using name\n");
    sample.append("}\n");
    sample.append("class Software {\n");
    sample.append("    att name : String\n");
    sample.append("    att size : Integer\n");
    sample.append("}\n");
    sample.append("index softwares : Software using name\n");
    return GCMTemplatesFactory.createFromTemplate(psiDirectory, fileName, template, sample.toString());
}
 
Example 7
Project: manifold-ij   File: ManLightMethodImpl.java   Source Code and License 6 votes vote down vote up
@Override
public PsiElement replace( PsiElement newElement ) throws IncorrectOperationException
{
  // just add new element to the containing class
  final PsiClass containingClass = getContainingClass();
  if( null != containingClass )
  {
    CheckUtil.checkWritable( containingClass );
    return containingClass.add( newElement );
  }
  return null;
}
 
Example 8
Project: manifold-ij   File: ManLightModifierListImpl.java   Source Code and License 5 votes vote down vote up
public void setModifierProperty( @PsiModifier.ModifierConstant String name, boolean value ) throws IncorrectOperationException
{
  if( value )
  {
    addModifier( name );
  }
  else
  {
    if( hasModifierProperty( name ) )
    {
      removeModifier( name );
    }
  }
}
 
Example 9
Project: intellij-plugin   File: CoffigYamlKeyValueManipulator.java   Source Code and License 5 votes vote down vote up
public YAMLKeyValueImpl handleContentChange(@NotNull YAMLKeyValueImpl element, @NotNull TextRange range, String newContent) throws IncorrectOperationException {
    String oldText = element.getText();
    String newText = oldText.substring(0, range.getStartOffset()) + newContent + oldText.substring(range.getEndOffset());
    YAMLValue value = element.getValue();
    Project project = element.getProject();
    if (value instanceof YAMLPlainTextImpl) {
        return (YAMLKeyValueImpl) element.replace(createYamlPlainText(project, element.getKeyText(), newText.substring(element.getTextLength() - element.getValueText().length())));
    }
    if (value instanceof YAMLQuotedTextImpl) {
        return (YAMLKeyValueImpl) element.replace(createYamlDoubleQuotedString(project, element.getKeyText(), newText.substring(element.getTextLength() - element.getValueText().length())));
    }
    return null;
}
 
Example 10
Project: GravSupport   File: ConvertTwigResource.java   Source Code and License 5 votes vote down vote up
@Override
public void invoke(@NotNull Project project, Editor editor, @NotNull PsiElement element) throws IncorrectOperationException {
    String text = "{{ url(\"theme://" + element.getText() + "\") }}";
    PsiElement psiElement = TwigElementFactory.createPsiElement(project, text, TwigElementTypes.PRINT_BLOCK);
    if (psiElement != null)
        element.replace(psiElement);
}
 
Example 11
Project: AppleScript-IDEA   File: AppleScriptReferenceElementImpl.java   Source Code and License 5 votes vote down vote up
@Override
public PsiElement handleElementRename(String newElementName) throws IncorrectOperationException {
  PsiElement element = this;
  final AppleScriptIdentifier identifier = PsiTreeUtil.getChildOfType(element, AppleScriptIdentifier.class);
  final AppleScriptIdentifier identifierNew = AppleScriptPsiElementFactory.createIdentifierFromText(getProject(), newElementName);
  if (identifierNew != null && identifier != null) {
    element.getNode().replaceChild(identifier.getNode(), identifierNew.getNode());
  }
  return this;
}
 
Example 12
Project: idea-php-behat-plugin   File: TestRunIntentionAction.java   Source Code and License 5 votes vote down vote up
@Override
public void invoke(@NotNull Project project, Editor editor, @NotNull PsiElement psiElement) throws IncorrectOperationException {
    PsiElement context = getTestContextElement(psiElement);
    if(context != null) {
        BehatPluginUtil.executeDebugRunner(psiElement);
    }
}
 
Example 13
Project: reasonml-idea-plugin   File: PsiTypeReference.java   Source Code and License 5 votes vote down vote up
@Override
public PsiElement handleElementRename(String newName) throws IncorrectOperationException {
    PsiElement newNameIdentifier = RmlElementFactory.createTypeName(myElement.getProject(), newName);
    ASTNode newNameNode = newNameIdentifier.getFirstChild().getNode();

    PsiElement nameIdentifier = myElement.getNameIdentifier();
    if (nameIdentifier == null) {
        myElement.getNode().addChild(newNameNode);
    } else {
        ASTNode oldNameNode = nameIdentifier.getNode();
        myElement.getNode().replaceChild(oldNameNode, newNameNode);
    }

    return myElement;
}
 
Example 14
Project: intellij-csv-validator   File: CsvValidationInspection.java   Source Code and License 5 votes vote down vote up
public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
    try {
        PsiElement element = descriptor.getPsiElement();
        Document document = PsiDocumentManager.getInstance(project).getDocument(element.getContainingFile());
        document.setText(document.getText() + "\"");
    } catch (IncorrectOperationException e) {
        LOG.error(e);
    }
}
 
Example 15
Project: manifold-ij   File: ManLightFieldBuilderImpl.java   Source Code and License 5 votes vote down vote up
@Override
public PsiElement replace( PsiElement newElement ) throws IncorrectOperationException
{
  // just add new element to the containing class
  final PsiClass containingClass = getContainingClass();
  if( null != containingClass )
  {
    CheckUtil.checkWritable( containingClass );
    return containingClass.add( newElement );
  }
  return null;
}
 
Example 16
Project: GravSupport   File: NewThemeConfigurationFileAction.java   Source Code and License 5 votes vote down vote up
@Nullable
@Override
protected PsiElement createFile(String name, String templateName, PsiDirectory dir) {
    try {
        return FileCreateUtil.createFile(name, dir, templateName, this);
    } catch (Exception e) {
        throw new IncorrectOperationException(e.getMessage(), new Throwable(e));
    }
}
 
Example 17
Project: json2java4idea   File: MethodNamePolicy.java   Source Code and License 5 votes vote down vote up
@Nonnull
@Override
public String convert(@Nonnull String name, @Nonnull TypeName type) {
    final String variableName = DefaultNamePolicy.format(name, CaseFormat.UPPER_CAMEL);
    if (Strings.isNullOrEmpty(variableName)) {
        throw new IllegalArgumentException("Cannot convert '" + name + "' to a method name");
    }

    try {
        final PsiType psiType = typeConverter.apply(type);
        return GenerateMembersUtil.suggestGetterName(variableName, psiType, project);
    } catch (IncorrectOperationException e) {
        throw new IllegalArgumentException("Cannot convert '" + name + "' to a method name", e);
    }
}
 
Example 18
Project: manifold-ij   File: ManLightMethodBuilderImpl.java   Source Code and License 5 votes vote down vote up
@Override
public PsiElement replace( PsiElement newElement ) throws IncorrectOperationException
{
  // just add new element to the containing class
  final PsiClass containingClass = getContainingClass();
  if( null != containingClass )
  {
    CheckUtil.checkWritable( containingClass );
    return containingClass.add( newElement );
  }
  return null;
}
 
Example 19
Project: yii2support   File: PsiReference.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement bindToElement(@NotNull PsiElement element) throws IncorrectOperationException {
    final StringLiteralExpression string = (StringLiteralExpression) this.getElement();
    final PsiDirectory context = ViewsUtil.getContextDirectory(string);
    final PsiFile file = (PsiFile) element;
    final PsiElement newValue;

    String fileName = string.getContents();
    if (fileName.contains("/")) {
        fileName = fileName.substring(fileName.lastIndexOf('/') + 1);
    }
    if (!file.getContainingDirectory().equals(context)) {
        final PsiDirectory root = ViewsUtil.getRootDirectory(string);
        if (root == null) {
            return null;
        }

        PsiDirectory dir = file.getContainingDirectory();
        while (dir != null && !(dir.equals(root) || dir.equals(context))) {
            fileName = dir.getName() + "/" + fileName;
            dir = dir.getParent();
        }

        if (dir == null) {
            return null;
        }

        if (dir.equals(root)) {
            fileName = "/" + fileName;
        }
    }
    fileName = string.isSingleQuote() ? "'" + fileName + "'" : "\"" + fileName + "\"";
    newValue = PhpPsiElementFactory.createFromText(element.getProject(), StringLiteralExpression.class, fileName);

    if (newValue != null) {
        string.replace(newValue);
    }

    for (MethodReference reference : PsiTreeUtil.findChildrenOfType(file, MethodReference.class)) {
        if (reference.getName() != null && ArrayUtil.contains(reference.getName(), ViewsUtil.renderMethods)) {
            reference.putUserData(ViewsUtil.RENDER_VIEW_FILE, null);
        }
    }

    return newValue;
}
 
Example 20
Project: yii2support   File: TestDataSource.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement setName(@NonNls @NotNull String s) throws IncorrectOperationException {
    return null;
}
 
Example 21
Project: bamboo-soy   File: TemplateBlockElement.java   Source Code and License 4 votes vote down vote up
@Override
default PsiElement setName(@NotNull String s) throws IncorrectOperationException {
  return null;
}
 
Example 22
Project: yii2support   File: TestDataSource.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement addBefore(@NotNull PsiElement psiElement, @Nullable PsiElement psiElement1) throws IncorrectOperationException {
    return null;
}
 
Example 23
Project: yii2support   File: TestDataSource.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement addAfter(@NotNull PsiElement psiElement, @Nullable PsiElement psiElement1) throws IncorrectOperationException {
    return null;
}
 
Example 24
Project: yii2support   File: TestDataSource.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement addRange(PsiElement psiElement, PsiElement psiElement1) throws IncorrectOperationException {
    return null;
}
 
Example 25
Project: yii2support   File: TestDataSource.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement addRangeBefore(@NotNull PsiElement psiElement, @NotNull PsiElement psiElement1, PsiElement psiElement2) throws IncorrectOperationException {
    return null;
}
 
Example 26
Project: yii2support   File: TestDataSource.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement addRangeAfter(PsiElement psiElement, PsiElement psiElement1, PsiElement psiElement2) throws IncorrectOperationException {
    return null;
}
 
Example 27
Project: intellij-csv-validator   File: CsvUnquoteValueIntentionAction.java   Source Code and License 4 votes vote down vote up
@Override
public void invoke(@NotNull Project project, Editor editor, PsiElement element) throws IncorrectOperationException {
    CsvIntentionHelper.unquoteValue(project, CsvIntentionHelper.getParentFieldElement(element));
}
 
Example 28
Project: intellij-csv-validator   File: CsvUnquoteAllIntentionAction.java   Source Code and License 4 votes vote down vote up
@Override
public void invoke(@NotNull Project project, Editor editor, PsiElement element) throws IncorrectOperationException {
    CsvIntentionHelper.unquoteAll(project, element.getContainingFile());
}
 
Example 29
Project: yii2support   File: TestDataSource.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement replace(@NotNull PsiElement psiElement) throws IncorrectOperationException {
    return null;
}
 
Example 30
Project: yii2support   File: TestNamespace.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement setName(@NonNls @NotNull String s) throws IncorrectOperationException {
    return null;
}
 
Example 31
Project: yii2support   File: TestNamespace.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement add(@NotNull PsiElement psiElement) throws IncorrectOperationException {
    return null;
}
 
Example 32
Project: manifold-ij   File: ManLightModifierListImpl.java   Source Code and License 4 votes vote down vote up
public void checkSetModifierProperty( @PsiModifier.ModifierConstant String name, boolean value ) throws IncorrectOperationException
{
  throw new IncorrectOperationException();
}
 
Example 33
Project: yii2support   File: TestNamespace.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement addAfter(@NotNull PsiElement psiElement, @Nullable PsiElement psiElement1) throws IncorrectOperationException {
    return null;
}
 
Example 34
Project: yii2support   File: TestNamespace.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement addRange(PsiElement psiElement, PsiElement psiElement1) throws IncorrectOperationException {
    return null;
}
 
Example 35
Project: manifold-ij   File: CreateExtensionMethodsClassAction.java   Source Code and License 4 votes vote down vote up
private PsiFile doCreate( PsiDirectory dir, String className, String fqnExtended ) throws IncorrectOperationException
{
  Project project = dir.getProject();

  String fileName = className + ".java";
  VirtualFile srcRoot = ProjectRootManager.getInstance( project ).getFileIndex().getSourceRootForFile( dir.getVirtualFile() );
  dir = getPsiDirectoryForExtensionClass( dir, fqnExtended, srcRoot );

  final PsiPackage pkg = JavaDirectoryService.getInstance().getPackage( dir );
  if( pkg == null )
  {
    throw new IncorrectOperationException( ManBundle.message( "error.new.artifact.nopackage" ) );
  }

  String text =
    "package " + pkg.getQualifiedName() + ";\n" +
    "\n" +
    "import manifold.ext.api.Extension;\n" +
    "import manifold.ext.api.This;\n" +
    "import " + fqnExtended + ";\n" +
    "\n" +
    "@Extension\n" +
    "public class " + className + " {\n" +
    "  public static " + processTypeVars( dir, fqnExtended, StubBuilder::makeTypeVar ) + "void helloWorld(@This " + ClassUtil.extractClassName( fqnExtended ) + processTypeVars( dir, fqnExtended, PsiNamedElement::getName ) + " thiz) {\n" +
    "    System.out.println(\"hello world!\");\n" +
    "  }\n" +
    "}";

  dir.checkCreateFile( fileName );

  final PsiFile file = dir.createFile( fileName );

  try
  {
    new CharSink()
    {
      public Writer openStream() throws IOException
      {
        return new OutputStreamWriter( file.getVirtualFile().getOutputStream( null ) );
      }
    }.write( text );
  }
  catch( IOException e )
  {
    throw new IncorrectOperationException( e.getMessage(), (Throwable)e );
  }

  return file;
}
 
Example 36
Project: bamboo-soy   File: AtInjectElement.java   Source Code and License 4 votes vote down vote up
default PsiElement setName(@NotNull String s) throws IncorrectOperationException {
  return null;
}
 
Example 37
Project: yii2support   File: TestNamespace.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement replace(@NotNull PsiElement psiElement) throws IncorrectOperationException {
    return null;
}
 
Example 38
Project: yii2support   File: TestColumn.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement setName(@NonNls @NotNull String s) throws IncorrectOperationException {
    return null;
}
 
Example 39
Project: hybris-integration-intellij-idea-plugin   File: ImpexMacrosReferenceBase.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement handleElementRename(final String newElementName) throws IncorrectOperationException {
    return getManipulator().handleContentChange(myElement, getRangeInElement(), newElementName);
}
 
Example 40
Project: yii2support   File: TestColumn.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement addAfter(@NotNull PsiElement psiElement, @Nullable PsiElement psiElement1) throws IncorrectOperationException {
    return null;
}
 
Example 41
Project: yii2support   File: TestColumn.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement addRange(PsiElement psiElement, PsiElement psiElement1) throws IncorrectOperationException {
    return null;
}
 
Example 42
Project: yii2support   File: TestColumn.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement addRangeBefore(@NotNull PsiElement psiElement, @NotNull PsiElement psiElement1, PsiElement psiElement2) throws IncorrectOperationException {
    return null;
}
 
Example 43
Project: yii2support   File: TestColumn.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement addRangeAfter(PsiElement psiElement, PsiElement psiElement1, PsiElement psiElement2) throws IncorrectOperationException {
    return null;
}
 
Example 44
Project: yii2support   File: TestColumn.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement replace(@NotNull PsiElement psiElement) throws IncorrectOperationException {
    return null;
}
 
Example 45
Project: yii2support   File: TestTable.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement setName(@NonNls @NotNull String s) throws IncorrectOperationException {
    return null;
}
 
Example 46
Project: magento2-phpstorm-plugin   File: LineMarkerXmlTagDecorator.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement setName(@NonNls @NotNull String s) throws IncorrectOperationException {
    return xmlTag.setName(s);
}
 
Example 47
Project: manifold-ij   File: MoveTypeManifoldFileProcessor.java   Source Code and License 4 votes vote down vote up
@Override
public void updateMovedFile( PsiFile file ) throws IncorrectOperationException
{
  // nothing to do
}
 
Example 48
Project: manifold-ij   File: FakeTargetElement.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement add( PsiElement element ) throws IncorrectOperationException
{
  throw new IncorrectOperationException( getClass().getName() );
}
 
Example 49
Project: yii2support   File: TestTable.java   Source Code and License 4 votes vote down vote up
@Override
@Deprecated
public void checkAdd(@NotNull PsiElement psiElement) throws IncorrectOperationException {

}
 
Example 50
Project: yii2support   File: TestTable.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement addRange(PsiElement psiElement, PsiElement psiElement1) throws IncorrectOperationException {
    return null;
}
 
Example 51
Project: yii2support   File: TestTable.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement addRangeBefore(@NotNull PsiElement psiElement, @NotNull PsiElement psiElement1, PsiElement psiElement2) throws IncorrectOperationException {
    return null;
}
 
Example 52
Project: yii2support   File: TestTable.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement addRangeAfter(PsiElement psiElement, PsiElement psiElement1, PsiElement psiElement2) throws IncorrectOperationException {
    return null;
}
 
Example 53
Project: yii2support   File: TestTable.java   Source Code and License 4 votes vote down vote up
@Override
@Deprecated
public void checkDelete() throws IncorrectOperationException {

}
 
Example 54
Project: yii2support   File: TestTable.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement replace(@NotNull PsiElement psiElement) throws IncorrectOperationException {
    return null;
}
 
Example 55
Project: manifold-ij   File: FakeTargetElement.java   Source Code and License 4 votes vote down vote up
@Override
public void checkDelete() throws IncorrectOperationException
{
  throw new IncorrectOperationException( getClass().getName() );
}
 
Example 56
Project: AppleScript-IDEA   File: AddApplicationDictionaryQuickFix.java   Source Code and License 4 votes vote down vote up
@Override
public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
  VirtualFile vFile = LocalFileSystem.getInstance().findFileByPath("/Applications/");
  LoadDictionaryAction.openLoadDirectoryDialog(project, vFile, newApplicationName);
}
 
Example 57
Project: AppleScript-IDEA   File: AppleScriptHandlerSelectorPart.java   Source Code and License 4 votes vote down vote up
@Override
PsiElement setName(@NotNull String name) throws IncorrectOperationException;
 
Example 58
Project: AppleScript-IDEA   File: AppleScriptStringManipulator.java   Source Code and License 4 votes vote down vote up
@Override
public AppleScriptStringLiteralExpression handleContentChange(@NotNull AppleScriptStringLiteralExpression element, @NotNull TextRange range, String newContent) throws IncorrectOperationException {
  String escaped = newContent.replaceAll("\"", "\\\\\"");
  AppleScriptStringLiteralExpression stringLiteral = AppleScriptPsiElementFactory.createStringLiteral(element.getProject(), escaped);
  return (AppleScriptStringLiteralExpression) element.replace(stringLiteral);
}
 
Example 59
Project: AppleScript-IDEA   File: ApplicationDictionaryImpl.java   Source Code and License 4 votes vote down vote up
@Override
public PsiElement setName(@NonNls @NotNull String name) throws IncorrectOperationException {
  dictionaryName = name;
  return this;
}
 
Example 60
Project: manifold-ij   File: ManLightFieldBuilderImpl.java   Source Code and License 4 votes vote down vote up
@Override
public void checkDelete() throws IncorrectOperationException
{
}