Package org.eclipse.jst.pagedesigner.editors

Examples of org.eclipse.jst.pagedesigner.editors.HTMLEditor


      }
    }
    if (part != null) {
      EditPartViewer viewer = ((ScalableRootEditPart) part.getParent())
          .getViewer();
      HTMLEditor editor = ((HTMLEditor) ((DefaultEditDomain) ((IHTMLGraphicalViewer) viewer)
          .getEditDomain()).getEditorPart());
      _viewer = editor.getTextEditor().getTextViewer();
    }
  }
View Full Code Here


    _quickEditTabSections = null;
    _groupsManager = null;
  }
 
  private Entity getTagEntity(IWorkbenchPart part, ISelection selection, Element node){
    HTMLEditor ed = null;
    if (part instanceof HTMLEditor)
      ed = (HTMLEditor)part;
    if (ed == null)
      return null;
   
    if (ed.getEditorInput() instanceof FileEditorInput) {
      FileEditorInput input = (FileEditorInput)ed.getEditorInput();
      IStructuredDocumentContext context = IStructuredDocumentContextFactory.INSTANCE.getContext(ed.getDocument(), node);
      if (context != null){
        ITaglibContextResolver resolver = IStructuredDocumentContextResolverFactory.INSTANCE.getTaglibContextResolver(context);
        if (resolver != null){
          ITaglibDomainMetaDataModelContext mdContext = TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(input.getFile().getProject(),resolver.getTagURIForNodeName(node));
          return TaglibDomainMetaDataQueryHelper.getEntity(mdContext, node.getLocalName());
View Full Code Here

  protected boolean htmlEditorIsInSourceOnlyMode() {
    boolean ret = false;
    if (_viewer instanceof HTMLGraphicalViewer) {
      IEditorPart parent = ((HTMLGraphicalViewer)_viewer).getParent();
      if (parent instanceof SimpleGraphicalEditor) {
        HTMLEditor htmlEditor = ((SimpleGraphicalEditor)parent).getHTMLEditor();
        if (htmlEditor != null) {
          ret = (htmlEditor.getDesignerMode() == HTMLEditor.MODE_SOURCE);
        }
      }
    }
    return ret;
  }
View Full Code Here

    _quickEditTabSections = null;
    _groupsManager = null;
  }
 
  private String getTagURIForNodeName(IWorkbenchPart part, ISelection selection, Element node) {
    HTMLEditor ed = null;
    if (part instanceof HTMLEditor)
      ed = (HTMLEditor)part;
    if (ed == null)
      return null;
   
    if (ed.getEditorInput() instanceof FileEditorInput) {
      IStructuredDocumentContext context = IStructuredDocumentContextFactory.INSTANCE.getContext(ed.getDocument(), node);
      if (context != null){
        ITaglibContextResolver resolver = IStructuredDocumentContextResolverFactory.INSTANCE.getTaglibContextResolver(context);
        if (resolver != null){
          return resolver.getTagURIForNodeName(node);
        }
View Full Code Here

    }
    return null;
  }
 
  private ITaglibDomainMetaDataQuery getQuery(IWorkbenchPart part, Element node) {
    HTMLEditor ed = null;
    if (part instanceof HTMLEditor)
      ed = (HTMLEditor)part;
    if (ed == null)
      return null;
   
   
    if (ed.getEditorInput() instanceof FileEditorInput) {
      final FileEditorInput input = (FileEditorInput)ed.getEditorInput();
      final IMetaDataDomainContext mdContext = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(input.getFile());
      return MetaDataQueryFactory.getInstance().createQuery(mdContext);
    }
    return null;
  }
View Full Code Here

  /**
   * @param enabled
   */
  public void setViewerSpecificContributionsEnabled(boolean enabled) {
    HTMLEditor htmlEditor = null;
    if (_editorPart instanceof HTMLEditor) {
      htmlEditor = (HTMLEditor) _editorPart;
    } else if (_editorPart instanceof SimpleGraphicalEditor) {
      htmlEditor = ((SimpleGraphicalEditor) _editorPart).getHTMLEditor();
    }

    if (htmlEditor == null)
      return;

    SimpleGraphicalEditor graphicalEditor = (SimpleGraphicalEditor) htmlEditor
        .getDesignViewer();
    IWorkbenchPartSite site = htmlEditor.getSite();
    if (site instanceof IEditorSite) {
      IActionBars actionBars = ((IEditorSite) site).getActionBars();

      if (enabled) {
        // // we always let the text editor to handle UNDO and REDO
View Full Code Here

TOP

Related Classes of org.eclipse.jst.pagedesigner.editors.HTMLEditor

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.