Package com.intellij.openapi.command

Examples of com.intellij.openapi.command.WriteCommandAction$Simple


    throws ProcessingErrorException
  {
    String result;
    try {
      // Find the simple object.
      Simple simple = simple_factory_ref.find_simple();

      if (changeCase.equals("UPPER")) {
        // Invoke the to_upper opeation on M3 Simple object
        org.omg.CORBA.StringHolder buf = new org.omg.CORBA.StringHolder(mixed);
        simple.to_upper(buf);
        result = buf.value;
      }
      else
      {
        result = simple.to_lower(mixed);
      }
   
    }
    catch (org.omg.CORBA.SystemException e) {
      throw new ProcessingErrorException("Converter error: Corba system exception: " + e);
View Full Code Here


    try {
      String result;

      // Find the simple object.
      Simple simple = simple_factory_ref.find_simple();

      if (changeCase.equals(defaultCase)) {
        // Invoke the to_upper opeation on WebLogic Enterprise Simple object
        org.omg.CORBA.StringHolder buf =
        new org.omg.CORBA.StringHolder(mixed);
        simple.to_upper(buf);
        result = buf.value;
      }
      else
      {
        // Invoke the to_lower opeation on WebLogic Enterprise Simple object
        result = simple.to_lower(mixed);
      }
      page.getBody()
        .addElement(new HeadingElement("Output String: " + result, 4));
       
      // Return the html to the client browser
View Full Code Here

            String after = text.substring(offset);
            final int indent = 0;
            String spaces = StringUtil.repeatSymbol(' ', indent);
            final String newText = before + "\n" + spaces + after;

            new WriteCommandAction(project) {
                @Override
                protected void run(Result result) throws Throwable {
                    console.setInputText(newText);
                    caretModel.moveToOffset(offset + indent + 1);
                }
View Full Code Here

    final PsiReference ref = context.getFile().findReferenceAt(tailOffset);
    if (ref == null || ref.resolve() != null) {
      // no import statement needed
      return;
    }
    new WriteCommandAction(context.getProject(), context.getFile()) {
      @Override
      protected void run(Result result) throws Throwable {
        final String importPath = (String)item.getObject();
        HaxeAddImportHelper.addImport(importPath, context.getFile());
      }
View Full Code Here

      doImport(editor, candidates.iterator().next());
    }
  }

  private void doImport(final Editor editor, final PsiElement component) {
    new WriteCommandAction(myType.getProject(), myType.getContainingFile()) {
      @Override
      protected void run(Result result) throws Throwable {
        HaxeAddImportHelper.addImport(((HaxeClass)component).getQualifiedName(), myType.getContainingFile());
      }
    }.execute();
View Full Code Here

    HaxeRestoreReferencesDialog dialog = new HaxeRestoreReferencesDialog(project, ArrayUtil.toStringArray(haxeClassList));
    dialog.show();
    String[] selectedObjects = dialog.getSelectedElements();

    for (final String object : selectedObjects) {
      new WriteCommandAction(project, file) {
        @Override
        protected void run(Result result) throws Throwable {
          HaxeAddImportHelper.addImport(object, file);
        }
      }.execute();
View Full Code Here

  }

  public void doTest() {
    myFixture.configureByFile(getTestName(false) + ".hx");
    final List<SmartEnterProcessor> processors = SmartEnterProcessors.INSTANCE.forKey(HaxeLanguage.INSTANCE);
    new WriteCommandAction(myFixture.getProject()) {
      @Override
      protected void run(@NotNull Result result) throws Throwable {
        final Editor editor = myFixture.getEditor();
        for (SmartEnterProcessor processor : processors) {
          processor.process(myFixture.getProject(), editor, myFixture.getFile());
View Full Code Here

  private void applyFixInner(final Project project) {
    final PsiFile file = myAnnotation.getContainingFile();
    final Editor editor = CodeInsightUtil.positionCursor(project, file, myAnnotation);
    if (editor != null) {
      new WriteCommandAction(project, file) {
        protected void run(Result result) throws Throwable {
          final PsiNameValuePair valuePair = selectAnnotationAttribute();

          if (null != valuePair) {
            // delete this parameter
View Full Code Here

  private void applyFixInner(final Project project) {
    final PsiFile psiFile = myClass.getContainingFile();
    final Editor editor = CodeInsightUtil.positionCursor(project, psiFile, myClass.getLBrace());
    if (editor != null) {
      new WriteCommandAction(project, psiFile) {
        protected void run(Result result) throws Throwable {

          final PsiElementFactory psiElementFactory = JavaPsiFacade.getInstance(myClass.getProject()).getElementFactory();
          final PsiField psiField = psiElementFactory.createField(myName, myType);
View Full Code Here

  private void applyFixInner(final Project project) {
    final PsiFile psiFile = myClass.getContainingFile();
    final Editor editor = CodeInsightUtil.positionCursor(project, psiFile, myClass.getLBrace());
    if (editor != null) {
      new WriteCommandAction(project, psiFile) {
        protected void run(Result result) throws Throwable {

          final PsiElementFactory psiElementFactory = JavaPsiFacade.getInstance(myClass.getProject()).getElementFactory();
          final PsiField psiField = psiElementFactory.createField(myName, myType);
View Full Code Here

TOP

Related Classes of com.intellij.openapi.command.WriteCommandAction$Simple

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.