Examples of WodParserCache


Examples of org.objectstyle.wolips.wodclipse.core.completion.WodParserCache

  protected PageRec doCreatePage(IWorkbenchPart part) {
    PageRec pageRec = null;
    if (part instanceof ComponentEditor) {
      _componentEditor = (ComponentEditor) part;
      try {
        WodParserCache cache = _componentEditor.getParserCache();
        IType componentType = cache.getComponentType();
        WOBrowserPage page = new WOBrowserPage(componentType);
        initPage(page);
        page.createControl(getPageBook());
        pageRec = new PageRec(part, page);
      } catch (Exception e) {
View Full Code Here

Examples of org.objectstyle.wolips.wodclipse.core.completion.WodParserCache

  public void run(IAction action) {
    try {
      TemplateEditor templateEditor = getTemplateEditor();
      WodEditor wodEditor = getWodEditor();
      if (templateEditor != null && wodEditor != null) {
        WodParserCache cache = templateEditor.getSourceEditor().getParserCache();
        FormatRefactoring.run(cache, new NullProgressMonitor());
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of org.objectstyle.wolips.wodclipse.core.completion.WodParserCache

  public void cursorPositionChanged(TextEditor editor, Point selectionRange) {
    _lastEditor = editor;
    _lastPosition = selectionRange;

    WodParserCache cache = null;
    IWodElement wodElement = null;
    if (editor instanceof IWOEditor) {
      try {
        IWOEditor woEditor = (IWOEditor) editor;
        cache = woEditor.getParserCache();
View Full Code Here

Examples of org.objectstyle.wolips.wodclipse.core.completion.WodParserCache

  public void run(IAction action) {
    try {
      TemplateEditor templateEditor = getTemplateEditor();
      WodEditor wodEditor = getWodEditor();
      if (templateEditor != null && wodEditor != null) {
        WodParserCache cache = templateEditor.getSourceEditor().getParserCache();
        CleanWOBuilderRefactoring.run(cache, false, new NullProgressMonitor());
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of org.objectstyle.wolips.wodclipse.core.completion.WodParserCache

        TemplateEditor templateEditor = getTemplateEditor();
        WodEditor wodEditor = getWodEditor();
        if (templateEditor != null && wodEditor != null && activeEditorPart == templateEditor) {
          ITextSelection templateSelection = (ITextSelection) templateEditor.getSourceEditor().getSelectionProvider().getSelection();
          int offset = templateSelection.getOffset();
          WodParserCache cache = templateEditor.getSourceEditor().getParserCache();
          BuildProperties buildProperties = (BuildProperties)cache.getProject().getAdapter(BuildProperties.class);
          ConvertInlineToWodRefactoring.run(cache, offset, buildProperties, new NullProgressMonitor());
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

Examples of org.objectstyle.wolips.wodclipse.core.completion.WodParserCache

    _browser.setBackground(_container.getBackground());
    _browser.addSelectionChangedListener(this);
    _browser.setLayoutData(new GridData(GridData.FILL_BOTH));
    if (_componentEditor != null) {
      try {
        WodParserCache cache = _componentEditor.getParserCache();
        if (cache != null) {
          _browser.setRootType(cache.getComponentType());
        }
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
View Full Code Here

Examples of org.objectstyle.wolips.wodclipse.core.completion.WodParserCache

      if (null != te) {
        IFileEditorInput input = (IFileEditorInput) te.getEditorInput();
        IFile file = input.getFile();

        try {
          WodParserCache cache = WodParserCache.parser(file);
          wo = cache.getWo(componentName);
        } catch (LocateException le) {
          ComponenteditorPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, ComponenteditorPlugin.PLUGIN_ID, IStatus.OK, "unable to get the Wo for an edited component", le));
        } catch (CoreException ce) {
          ComponenteditorPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, ComponenteditorPlugin.PLUGIN_ID, IStatus.OK, "unable to get the Wo for an edited component", ce));
        } catch (ApiModelException ame) {
View Full Code Here

Examples of org.objectstyle.wolips.wodclipse.core.completion.WodParserCache

        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

Examples of org.objectstyle.wolips.wodclipse.core.completion.WodParserCache

    super();
  }

  public WodParserCache getParserCache() throws Exception {
    IEditorPart editorPart = getActiveEditor();
    WodParserCache parserCache = null;
    if (editorPart instanceof IWOEditor) {
      parserCache = ((IWOEditor) editorPart).getParserCache();
    }
    return parserCache;
  }
View Full Code Here

Examples of org.objectstyle.wolips.wodclipse.core.completion.WodParserCache

public class WOComponentContentTagDelegate extends TagDelegate {

  @Override
  public void renderNode(IWodElement wodElement, FuzzyXMLElement xmlElement, RenderContext renderContext, StringBuffer htmlBuffer, StringBuffer cssBuffer, Stack<WodParserCache> caches, Stack<FuzzyXMLNode> nodes) {
    WodParserCache parentCache = caches.pop();
    try {
      if (!nodes.isEmpty()) {
        nodes.peek().toXMLString(renderContext, htmlBuffer);
      }
      else {
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.