Examples of Editor


Examples of com.ecyrd.jspwiki.ui.Editor

        Collection<Editor> editors = new ArrayList<Editor>();

        for ( int i = 0; i < editorList.length; i++ )
        {
            editors.add(new Editor(m_wikiContext, editorList[i]));
        }
        setList( editors );

        return super.doStartTag();
    }
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.Editor

    ctxtMenu.add(RENAME, "icon-rename");
    return ctxtMenu.getMenu();
  }

  private final void rename(final EditableTreeItem item) {
    final Editor editor = item.getEditor();
    Listener<EditorEvent> editorListener = new Listener<EditorEvent>() {
      public void handleEvent(EditorEvent ev) {
        editor.removeListener(Events.Complete, this);
        if (!ev.startValue.equals(ev.value))
          doRename(item);
      }
    };
    editor.addListener(Events.Complete, editorListener);
    item.startEdit();
  }
View Full Code Here

Examples of com.google.api.explorer.client.editors.Editor

      requiredDescription.setVisible(true);
      cellFormatter.addStyleName(row, 0, EmbeddedResources.INSTANCE.style().requiredParameter());
    }

    // Second cell in row displays the editor for the parameter value.
    Editor editor = EditorFactory.forParameter(param);
    nameToEditor.put(paramName, editor);

    Widget editorWidget = editor.createAndSetView().asWidget();
    editorWidget.addStyleName(style.parameterInput());
    table.setWidget(row, 1, editorWidget);

    // Third cell in row displays the description.
    table.setText(row, 2, EmbeddedParameterFormPresenter.generateDescriptionString(param));

    if (paramName.equals("alt")) {
      editor.setValue(ImmutableList.of("json"));
    }

    cellFormatter.addStyleName(row, 0,
        EmbeddedResources.INSTANCE.style().parameterFormNameCell());
    cellFormatter.addStyleName(row, 1,
View Full Code Here

Examples of com.google.collide.client.editor.Editor

      final Spacer.OneWaySpacerComparator spacerFinder = new Spacer.OneWaySpacerComparator();

      defaultMode.addShortcut(new EventShortcut(ModifierKeys.ACTION, 'i') {
        @Override
        public boolean event(InputScheme scheme, SignalEvent event) {
          final Editor editor = scheme.getInputController().getEditor();
          spacers.add(editor.getBuffer().addSpacer(
              new LineInfo(editor.getSelection().getCursorLine(), editor.getSelection()
                  .getCursorLineNumber()), new Random().nextInt(500) + 1));
          return true;
        }
      });

      defaultMode.addShortcut(new EventShortcut(ModifierKeys.ACTION, 'd') {
        @Override
        public boolean event(InputScheme scheme, SignalEvent event) {
          final Editor editor = scheme.getInputController().getEditor();
          spacerFinder.setValue(editor.getSelection().getCursorLineNumber());
          int spacerIndex = spacers.findInsertionIndex(spacerFinder, false);
          if (spacerIndex >= 0) {
            editor.getBuffer().removeSpacer(spacers.get(spacerIndex));
            spacers.remove(spacerIndex);
          }
          return true;
        }
      });

      defaultMode.addShortcut(new EventShortcut(ModifierKeys.ACTION, 'u') {
        @Override
        public boolean event(InputScheme scheme, SignalEvent event) {
          final Editor editor = scheme.getInputController().getEditor();
          spacerFinder.setValue(editor.getSelection().getCursorLineNumber());
          int spacerIndex = spacers.findInsertionIndex(spacerFinder, false);
          if (spacerIndex >= 0) {
            // spacers.get(spacerIndex).setHeight(new Random().nextInt(500)+1);
          }
          return true;
        }
      });
    }

    if (ENABLE_ANIMATION_CONTROL_KEYS) {
      defaultMode.addShortcut(new EventShortcut(ModifierKeys.ACTION, 'e') {
        @Override
        public boolean event(InputScheme scheme, SignalEvent event) {
          final Editor editor = scheme.getInputController().getEditor();
          editor.setAnimationEnabled(true);
          return true;
        }
      });

      defaultMode.addShortcut(new EventShortcut(ModifierKeys.ACTION, 'd') {
        @Override
        public boolean event(InputScheme scheme, SignalEvent event) {
          final Editor editor = scheme.getInputController().getEditor();
          editor.setAnimationEnabled(false);
          return true;
        }
      });
    }
View Full Code Here

Examples of com.google.devtools.moe.client.editors.Editor

  @Override
  public Codebase createCodebase(ProjectContext context) throws CodebaseCreationError {
    Codebase codebaseToEdit = exToEdit.createCodebase(context);
    String editorName = editOp.term.identifier;
    Editor editor = context.editors.get(editorName);
    if (editor == null) {
      throw new CodebaseCreationError("no editor " + editorName);
    }

    Ui.Task editTask = AppContext.RUN.ui.pushTask(
        "edit",
        "Editing " + codebaseToEdit.getPath() + " with editor " + editor.getDescription());

    Codebase editedCodebase = editor.edit(codebaseToEdit, context, editOp.term.options);

    AppContext.RUN.ui.popTaskAndPersist(editTask, editedCodebase.getPath());
    return editedCodebase.copyWithExpression(this);
  }
View Full Code Here

Examples of com.googlecode.jumpnevolve.editor.Editor

    if (function instanceof SubMenu) {
      this.switchTo(function.getFunctionName().split("_")[1]);
    } else if (function == InterfaceFunctions.MENU_EDITOR) {
      try {
        Engine.getInstance().switchState(
            new Editor(this, this.getWidth(), this.getHeight(), 1));
      } catch (IOException e) {
        Log.error("Fehler beim Erstellen des Editors: "
            + e.getMessage());
        e.printStackTrace();
      }
View Full Code Here

Examples of com.intellij.openapi.editor.Editor

        final OpenFileDescriptor desc = new OpenFileDescriptor(project, script);
        if (desc.canNavigateToSource()) {
            desc.navigate(true);
            final FileEditor fileEditor = fileMgr.getSelectedEditor(script);
            if (fileEditor instanceof TextEditor) {
                final Editor editor = ((TextEditor) fileEditor).getEditor();
                final Document document = editor.getDocument();
                final PsiFile psiFile = psiMgr.getPsiFile(document);
                if (!(psiFile instanceof XmlFile))
                    return;

                final XmlFile xmlFile = (XmlFile) psiFile;
                final XmlDocument xmlDoc = xmlFile.getDocument();
                if (xmlDoc == null)
                    return;

                final XmlTag projectTag = xmlDoc.getRootTag();
                if (projectTag == null)
                    return;

                final XmlTag[] goals = projectTag.findSubTags("goal");
                final String goalName = pGoal.getName();
                for (XmlTag goalTag : goals) {
                    if (goalName.equals(goalTag.getAttributeValue("name"))) {
                        final int offset = goalTag.getTextOffset();
                        editor.getCaretModel().moveToOffset(offset);
                        editor.getScrollingModel().scrollToCaret(ScrollType.CENTER);
                        break;
                    }
                }
            }
        }
View Full Code Here

Examples of com.intellij.openapi.editor.Editor

{
  @Override
  public void actionPerformed(AnActionEvent e)
  {
    Project project = e.getData(PlatformDataKeys.PROJECT);
    Editor editor = e.getData(PlatformDataKeys.EDITOR);
    VirtualFile vFile = RevuUtils.getVirtualFile(e);

    if ((project == null) || (vFile == null))
    {
      return;
    }

    Issue issue = new Issue();
    issue.setFile(vFile);
    if (editor != null)
    {
      Document document = editor.getDocument();
      int lineStart = document.getLineNumber(editor.getSelectionModel().getSelectionStart());
      int lineEnd = document.getLineNumber(editor.getSelectionModel().getSelectionEnd());

      issue.setLineStart(lineStart);
      issue.setLineEnd(lineEnd);
      CharSequence fragment = document.getCharsSequence().subSequence(document.getLineStartOffset(lineStart),
        document.getLineEndOffset(lineEnd));
View Full Code Here

Examples of com.intellij.openapi.editor.Editor

  }

  public boolean isSelected(AnActionEvent e)
  {
    VcsContext context = VcsContextFactory.SERVICE.getInstance().createContextOn(e);
    Editor editor = context.getEditor();
    if (editor == null)
    {
      return false;
    }

    Collection annotations = editor.getUserData(KEY_IN_EDITOR);
    return annotations != null && !annotations.isEmpty();
  }
View Full Code Here

Examples of com.intellij.openapi.editor.Editor

  }

  public void setSelected(AnActionEvent e, boolean state)
  {
    VcsContext context = VcsContextFactory.SERVICE.getInstance().createContextOn(e);
    Editor editor = context.getEditor();
    if (!state)
    {
      if (editor != null)
      {
        editor.getGutter().closeAllAnnotations();
      }
    }
    else
    {
      if (editor == null)
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.