Package org.objectstyle.wolips.templateeditor

Examples of org.objectstyle.wolips.templateeditor.TemplateEditor


  @Override
  public void run(IAction action) {
    try {
      ComponentEditorPart componentEditorPart = getComponentEditorPart();
      if (componentEditorPart != null) {
        TemplateEditor templateEditor = getTemplateEditor();
        WodEditor wodEditor = getWodEditor();
        if (templateEditor != null && wodEditor != null) {
          IType componentType = templateEditor.getParserCache().getComponentType();
          AddActionInfo info = new AddActionInfo(componentType);
          AddActionDialog.open(info, getComponentEditorPart().getSite().getShell());
        }
      }
    } catch (Exception e) {
View Full Code Here


   * </P>
   */
  protected Wo getWo(String componentName) {
    Wo wo = null;
    if (componentName != null) {
      TemplateEditor te = getTemplateEditor();
      if (null != te) {
        IFileEditorInput input = (IFileEditorInput) te.getEditorInput();
        IFile file = input.getFile();

        try {
          WodParserCache cache = WodParserCache.parser(file);
          wo = cache.getWo(componentName);
View Full Code Here

    return wo;
  }

  protected IJavaProject getJavaProject() {
    IJavaProject javaProject = null;
    TemplateEditor te = getTemplateEditor();
    if (te != null) {
      IFileEditorInput input = (IFileEditorInput) te.getEditorInput();
      IFile file = input.getFile();
      if (file != null) {
        javaProject = JavaCore.create(file.getProject());
      }
    }
View Full Code Here

  public void run(IAction action) {
    try {
      ComponentEditorPart componentEditorPart = getComponentEditorPart();
      if (componentEditorPart != null) {
        IEditorPart activeEditorPart = componentEditorPart.getActiveEditor();
        TemplateEditor templateEditor = getTemplateEditor();
        WodEditor wodEditor = getWodEditor();
        if (templateEditor != null && wodEditor != null) {
          if (activeEditorPart == templateEditor) {
            ITextSelection templateSelection = (ITextSelection) templateEditor.getSourceEditor().getSelectionProvider().getSelection();
            int offset = templateSelection.getOffset();
            WodParserCache cache = templateEditor.getSourceEditor().getParserCache();
            QuickRenameRefactoring.renameHtmlSelection(offset, templateEditor.getSourceEditor().getViewer(), wodEditor.getViewer(), cache);
          } else if (activeEditorPart == wodEditor) {
            ITextSelection wodSelection = (ITextSelection) wodEditor.getSelectionProvider().getSelection();
            int offset = wodSelection.getOffset();
            WodParserCache cache = wodEditor.getParserCache();
            QuickRenameRefactoring.renameWodSelection(offset, templateEditor.getSourceEditor().getViewer(), wodEditor.getViewer(), cache);
          } else {
            System.out.println("QuickRenameElementAction.run: " + activeEditorPart);
          }
        }
      }
View Full Code Here

  @Override
  public void run(IAction action) {
    try {
      ComponentEditorPart componentEditorPart = getComponentEditorPart();
      if (componentEditorPart != null) {
        TemplateEditor templateEditor = getTemplateEditor();
        WodEditor wodEditor = getWodEditor();
        if (templateEditor != null && wodEditor != null) {
          IType componentType = templateEditor.getParserCache().getComponentType();
          AddKeyInfo info = new AddKeyInfo(componentType);
          AddKeyDialog.open(info, getComponentEditorPart().getSite().getShell());
        }
      }
    } catch (Exception e) {
View Full Code Here

  @Override
  protected void createPages() {
    super.createPages();

    if (!_dragAndDropInitialized) {
      TemplateEditor templateEditor = getTemplateEditor();
      if (templateEditor != null) {
        TemplateSourceEditor templateSourceEditor = templateEditor.getSourceEditor();
        initializeDragAndDrop(templateSourceEditor.getViewer());
      }
      _dragAndDropInitialized = true;
    }
   
View Full Code Here

TOP

Related Classes of org.objectstyle.wolips.templateeditor.TemplateEditor

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.