`
zhaozhongwei
  • 浏览: 54312 次
  • 性别: Icon_minigender_1
  • 来自: 沈阳
社区版块
存档分类
最新评论

dltk & php

阅读更多

dltk code Completion

org.eclipse.dltk.ui.text.completion.ScriptCompletionProposalComputer#computeCompletionProposals

the Language specific proposals is on top of Template proposals

 

if want to change the proposals' older,could store the configure the older in the preference page and

store it(format like "computeScriptCompletionProposals,computeTemplateCompletionProposals,other"),and ScriptCompletionProposalComputer's subclass override computeCompletionProposals,split the stored value then iterate them and then judge it use if ,finally call the corresponding method,so the older is under control.

 


code completion contexts : CompletionContextResolver.java    /org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/contexts

 


php completion engine    PHPCompletionEngine.java    /org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist

php evaluate expression    PHPWatchExpressionDelegate.java    /org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/watch


php text hover    PHPDebugTextHover.java    /org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/hovers

 

 

 

 

Bug 207699
Static class variables do not show up in the Variables view when debugging in the PHP Debug perspective

because the value is got from PHPValue#getVariables,requestVariables,actually the RemoteDebugger send a
GetVariableValueRequest
response = (GetVariableValueResponse) connection
                    .sendRequest(request);
...
return response.getVarResult();

and then ExpressionsValueDeserializer#deserializer use VariableReader to deserialize the value

it seems there is no method to get a static variable's value



java hit count store the hitcount number in BreakpointRequestImpl(EventRequestImpl).fCountFilters,
and then write to JDWP bytestream(outData)
JavaBreakpoint#configureRequestHitCount
    protected void configureRequestHitCount(EventRequest request) throws CoreException {
        int hitCount= getHitCount();
        if (hitCount > 0) {
            request.addCountFilter(hitCount);//store to EventRequestImpl.fCountFilters
            request.putProperty(HIT_COUNT, new Integer(hitCount));
        }
    }
   
writeInt(((Integer)fCountFilters.get(i)).intValue(), "count filter", outData);

so if want to add hit count support to pdt,it must be supported by the debugger

link with debug view is completed through PHPThread#setBreakpoints which is called by
PHPDebugTarget#breakpointHit.

the php debug is through the ui ,then new request for the special action then receive response.
when start a php debug,pdt will add all breakpoints to the remote debugger(AddBreakpointRequest)


get content type for a text viewer and the text offset
            IDocument document= viewer.getDocument();
            String type= TextUtilities.getContentType(document, getDocumentPartitioning(), offset, true);

php code assist works in the html contest,this is for PHPStructuredTextViewerConfiguration#getContentAssistProcessors


type <input type="hi in php file entry "ctrl" + "space" will not show "hidden".
this because php PHPTokenizer(about line 1944)

// JSP attribute value start - complex single quoted
                assembleEmbeddedContainer(XML_TAG_ATTRIBUTE_VALUE_SQUOTE,
                        XML_TAG_ATTRIBUTE_VALUE_SQUOTE);

this make XML_TAG_ATTRIBUTE_VALUE_SQUOTE ContextRegionContainer type not AttributeValueRegion type.

and then in HTMLContentAssistProcessor#addAttributeValueProposals method (line 343)

// d210858, if the region's a container, don't suggest the
// enumerated values as they probably won't help
boolean existingComplicatedValue = (contentAssistRequest.getRegion() != null) && (contentAssistRequest.getRegion() instanceof ITextRegionContainer);
if (!existingComplicatedValue) {
...
}

so the "hidden" string not popup when entry "ctrl" + "space"


editor base wtp,its code assist is computed in CompoundContentAssistProcessor#computeCompletionProposals
here has some relation with StructuredTextViewerConfigurationHTML#getContentAssistProcessors,subclass
reimplement this method to deal with the partition types that it is interested in.




    <!-- PHP Model Handler -->
    <extension
        point="org.eclipse.wst.sse.core.modelHandler">
        <modelHandler
            default="yes"
            class="org.eclipse.php.internal.core.documentModel.handler.PHPModelHandler"
            associatedContentTypeId="org.eclipse.php.core.phpsource"
            id="org.eclipse.php.core.documentModel.handler">
        </modelHandler>
    </extension>
   
    org.eclipse.php.internal.core.documentModel.handler.PHPModelHandler
   
    public IDocumentLoader getDocumentLoader() {
        return new PHPDocumentLoader();
    }
   
    in PHPDocumentLoader
   
    protected IEncodedDocument newEncodedDocument() {
        IEncodedDocument doc = super.newEncodedDocument();
        assert doc instanceof BasicStructuredDocument;
        ((BasicStructuredDocument) doc)
                .setReParser(new PhpStructuredDocumentReParser());

        // doc.setPreferredLineDelimiter( "\n" );
        return doc;
    }

    public RegionParser getParser() {
        PhpSourceParser parser = new PhpSourceParser();
        // for the "static HTML" case, we need to initialize
        // Blocktags here.
        addHTMLishTag(parser, "script"); //$NON-NLS-1$
        addHTMLishTag(parser, "style"); //$NON-NLS-1$
        return parser;
    }

when change something in php editor will call PhpStructuredDocumentReParser#reparse,
then PhpSourceParser#parseNodes,then PHPTokenizer#getNextToken
then ContextRegionContainer...will be instanced


ScriptCompletionProcessor


PHPStructuredEditor#

        resAction = new TextOperationAction(
                DLTKEditorMessages.getBundleForConstructedKeys(),
                "ShowOutline.", this, PHPStructuredTextViewer.SHOW_OUTLINE, true); //$NON-NLS-1$
        resAction
                .setActionDefinitionId(IScriptEditorActionDefinitionIds.SHOW_OUTLINE); //$NON-NLS-1$
        setAction(IScriptEditorActionDefinitionIds.SHOW_OUTLINE, resAction);
       
PHPStructuredTextViewer#configure

        fOutlinePresenter = phpConfiguration.getOutlinePresenter(this);
        if (fOutlinePresenter != null) {
            fOutlinePresenter.install(this);
        }
       
       
PHPStructuredTextViewer#doOperation

        case SHOW_OUTLINE:
            if (fOutlinePresenter != null) {
                fOutlinePresenter.showInformation();
            }
            return;
           
PHPStructuredTextViewerConfiguration#getOutlinePresenter

 

 

 

 

refactor is in DeltaProcessor#updateModel,ModelUpdater#traverseDelta,SourceModule#close

 

 

 

 

分享到:
评论

相关推荐

    CDT+DLTK Eclipse Plugins

    CDT+DLTK Eclipse Plugins, 直接拷贝,无需安装。

    dltk-R-3.0-201106091504-updateSite

    标题 "dltk-R-3.0-201106091504-updateSite" 暗示这是一个关于 DLTK (Dynamic Languages Toolkit) 的更新站点包,主要用于R语言版本3.0。DLTK 是一个开源项目,旨在支持动态编程语言的集成开发环境(IDE),提供了...

    Python库 | dltk_ai-1.1.4-py3-none-any.whl

    **Python库dltk.ai简介** `dltk_ai-1.1.4-py3-none-any.whl` 是一个Python库的压缩包,主要用于深度学习领域。这个库名为dltk(Deep Learning Toolbox),它是一个开放源代码的框架,设计用于简化医学图像分析中的...

    An+Introduction+to+Biomedical+Image+Analysis+with+TensorFlow+and+DLTK

    TensorFlow和DLTK(Deep Learning Toolkit for Medical Imaging)是实现这一目标的重要工具。TensorFlow是由Google开发的开源机器学习框架,广泛应用于图像识别、语音识别、自然语言处理等领域。而DLTK是专为医疗...

    Eclipse开发php

    使用Eclipse开发PHP项目需要配置好PHP环境,包括安装Apache、PHP、Eclipse IDE for Java EE Developers、DLTK Core Frameworks 1.0 Integration build、PDT 2.0和Zend Debugger。按照上述步骤配置好PHP环境后,可以...

    shelled+dltk.zip

    eclipse下 离线 搭建shell脚本编辑器--...1、首先要安装 dltk : 动态语言工具包 dltk-R-5.10-201808292040 2、安装shelled插件 net.sourceforge.shelled-site-2.0.3 解决在官网下载不了时,离线安装包,都是最新版本

    PyPI 官网下载 | qubitai-dltk-1.0.2.tar.gz

    《PyPI官网下载 | qubitai-dltk-1.0.2.tar.gz——深度学习库解析》 在Python编程环境中,PyPI(Python Package Index)是最重要的资源库之一,它为开发者提供了大量的开源软件包和模块,使得开发变得更加便捷。本篇...

    Python-DLTK用于医学图像分析的深度学习工具箱

    **Python-DLTK深度学习工具箱详解** DLTK(Deep Learning Toolkit for Medical Image Analysis)是专为医学图像分析设计的深度学习工具箱,基于Python编程语言,并构建在强大的TensorFlow框架之上。它提供了一系列...

    php开发工具的下载地址

    4. **DLTK Core Frameworks 1.0 Integration build**:动态语言开发工具包,是Eclipse中用于支持PHP开发的基础框架。 5. **PDT (PHP Development Tools)**:Eclipse的PHP开发插件,提供代码编辑、调试等功能。 6. ...

    CDT+DLTK Eclipse Plugins (First-pachages)

    CDT+DLTK Eclipse Plugins (First-pachage)安装包

    openDLTK_beta:此存储库用于测试DLTK功能,功能和测试

    DLTK-深度学习工具包 什么是DLTK? 此仓库包含用于分类,回归和聚类,计算机视觉和自然语言处理的所有广泛使用的机器学习技术(作为Docker映像) 此存储库包含与ML,Computer Vision和NLP相对应的所有开源Docker...

    eclipse for php 设置

    5. **DLTK Core Frameworks 1.0 Integration build**:用于提供 Eclipse 中 PHP 开发的核心支持。 - 下载地址:http://download.eclipse.org/technology/dltk/downloads/ - 注意:尽管文档中提到的是 DLTK,但实际...

    dltk-R-5.10-201808292040和net.sourceforge.shelled-site-2.0.3.zip

    eclipse下 离线 搭建shell脚本编辑器-...1、首先要安装 dltk : 动态语言工具包 dltk-R-5.10-201808292040 2、安装shelled插件 net.sourceforge.shelled-site-2.0.3 解决在官网下载不了时,离线安装包,都是最新版本

    models:DLTK模型动物园

    DLTK模型动物园 模型动物园中的引用和引用方法 要了解如何引用每个实现,请参考作者的README.md中的规范。 如果您在工作中使用DLTK,请参考以下引用: @article{pawlowski2017state, title={DLTK: State of the ...

    EPP3配置方法

    通过以上步骤,我们成功地配置了一个基于Eclipse的PHP开发环境,包括Apache服务器、PHP解析器、Eclipse IDE、DLTK、PDT2.0和Zend Debugger的安装与配置。这样的配置不仅适合新手快速上手,也能够满足更高级别的开发...

    DLTK:Deutsch语言工具套件

    **DLTK:德语语言工具套件** DLTK(Deutsch Language Toolkit)是一个专门针对德语文本处理的开源工具集,旨在为德语自然语言处理(NLP)提供便利。这个工具包通常由编程人员、数据科学家以及对德语文本分析感兴趣...

    为Perl、Python和PHP构建Eclipse开发环境

    编程语言的工具提供了大量特性,但对脚本语言(比如Perl、Python和PHP)的支持却很少。庆幸的是,EclipseDynamicLanguagesToolkit(DLTK)为这些语言以及类似的语言提供了支持。通过本文学习构建基于DLTK的IDE的步骤,...

    Myeclipse禁用updating indexes

    ### MyEclipse禁用Updating Indexes详解 在开发过程中,我们常常会遇到IDE(集成开发环境)中的某些功能设置对工作效率产生一定影响的情况。对于MyEclipse用户而言,“Updating Indexes”这一特性就是一个典型例子...

Global site tag (gtag.js) - Google Analytics