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

org.eclipse.core.expressions.propertyTesters

阅读更多

   <extension point="org.eclipse.core.expressions.propertyTesters">
      <propertyTester
        id="org.eclipse.jdt.core.javaElementPropertyTester"
        class="org.eclipse.jdt.internal.core.manipulation.JavaElementPropertyTester"
        namespace="org.eclipse.jdt.core"
        properties="name,isInJavaProject,isInJavaProjectWithNature,isOnClasspath,hasTypeOnClasspath,inSourceFolder,inArchive,inExternalArchive,projectOption"
        type="org.eclipse.jdt.core.IJavaElement"/>
   </extension>

 

用法:

                  <adapt type="org.eclipse.jdt.core.IJavaElement">
                   <test property="org.eclipse.jdt.core.isInJavaProject"/>
                  </adapt>

 

 

         <enabledWhen>
            <and>
        <instanceof value="org.eclipse.jdt.core.IPackageFragmentRoot"/>
        <not>
          <test property="org.eclipse.jdt.core.inSourceFolder"/>
        </not>
      </and>
         </enabledWhen>

JavaElementPropertyTester继承PropertyTester,实现test方法,被test的对象是第一个参数,property如isInJavaProject,inSourceFolder是第二个参数,第三个参数是参数,第四个参数是期望值,如:

         <enabledWhen>
       <adapt type="org.eclipse.core.resources.IProject">
            <test property="org.eclipse.core.resources.projectNature" value="org.eclipse.jdt.core.javanature"/>
       </adapt>        
         </enabledWhen>

 

里面的value是第四个参数

 

 

 

点右键出现的properties是通过org.eclipse.ui.propertyPages来扩展的

 

 

 

 

 

 

   <extension point="org.eclipse.ui.commands">

      <command
            name="%ActionDefinition.stepIntoSelection.name"
            description="%ActionDefinition.stepIntoSelection.description"
            categoryId="org.eclipse.debug.ui.category.run"
            id="org.eclipse.jdt.debug.ui.commands.StepIntoSelection">
      </command>

   </extension>

 

   <extension point="org.eclipse.ui.bindings">
      <key
            sequence="M1+F5"
            contextId="org.eclipse.debug.ui.debugging"
            commandId="org.eclipse.jdt.debug.ui.commands.StepIntoSelection"
            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>

   </extension>

 

 

         <action
               class="org.eclipse.jdt.internal.debug.ui.actions.StepIntoSelectionActionDelegate"
               definitionId="org.eclipse.jdt.debug.ui.commands.StepIntoSelection"
               enablesFor="*"
               helpContextId="step_into_selection_action_context"
               id="org.eclipse.jdt.debug.ui.cuPopup.StepIntoSelection"
               label="%stepIntoSelectionAction.label"
               menubarPath="additions">
         </action>

 

definitionId是commandId

 

 

 

codeassist与ContentAssistAction,ContentAssistant,CompletionProposalPopup,显示的是CompletionProposalPopup#fProposalShell

 

 

 

Using Fast Views in Eclipse RCP

In Adding the error view to RCP application one commenter asked how he could add a view as a fast view to an Eclipse RCP application.

To add views as fast view to your RCP application you have to do two things:

1.) Add your view as “fast” via the perspective extension point

 

 

2.) Activate the FastViewBar via the ApplicationWorkbenchWindow Advisor (configurer.setShowFastViewBars(true);)

package de.vogella.test;

import org.eclipse.swt.graphics.Point;
import org.eclipse.ui.application.ActionBarAdvisor;
import org.eclipse.ui.application.IActionBarConfigurer;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.application.WorkbenchWindowAdvisor;

public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {

    public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
        super(configurer);
    }

    @Override
	public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
        return new ApplicationActionBarAdvisor(configurer);
    }

    @Override
	public void preWindowOpen() {
    	IWorkbenchWindowConfigurer configurer = getWindowConfigurer();

    	configurer.setInitialSize(new Point(1024, 800));
		configurer.setShowStatusLine(true);
		configurer.setTitle("Network Analyser");
		configurer.setShowFastViewBars(true);
    }

}

This should be sufficient to show your view in your RCP application in the fast view pane.

 

 

分享到:
评论

相关推荐

    org.eclipse.core.expressions.nl_zh_4.20.0.v20210630020001.jar

    Eclipse-plugins 各种插件 .jar 包,免费下载 如果下载不了,关注我,评论区联系我

    RCP的Navigator例子源代码(包括修改默认的new右键菜单)

    5. **激活和禁用条件**:如果需要根据上下文决定菜单是否显示或可用,可以创建一个`org.eclipse.core.expressions`表达式来控制命令的激活状态。 在`org.eclipse.ui.examples.navigator`和`com.itec.rcp`这两个目录...

    Z.Expressions.Eval 4.0.68.zip

    包含了两个针对不同.NET平台的版本:"Z.Expressions.Eval for net6.zip"是专门为.NET 6编译的,而"Z.Expressions.Eval for net standard2.1.zip"则是遵循.NET Standard 2.1规范,这意味着它可以被.NET Core、.NET ...

    Z.Expressions.Eval.2.4.2

    Z.Expressions.Eval 2.4.2 是一个专注于表达式解析的开源库,它由Java语言构建,设计为超轻量级且高度可扩展。这个工具包的主要目标是提供一个强大的框架,允许开发者在应用程序中方便地处理和执行自定义的公式化...

    Z.Expressions.Eval.rar

    &lt;PackageReference Include="Microsoft.OData.Core" Version="7.8.3" /&gt; &lt;PackageReference Include="Newtonsoft.Json" Version="11.0.2" /&gt; &lt;PackageReference Include="System.Collections.Concurrent" Version...

    com.springsource.org.aspectj.weaver-1.6.8.RELEASE 下载

    4. **强大的切点表达式(Pointcut Expressions)**:AspectJ提供了一套强大且灵活的切点表达式语言,用于精确地定义何时、何地以及如何应用切面。 5. **注解支持(Annotation Support)**:1.6.8.RELEASE版本的...

    Packt.Java.9.Regular.Expressions

    java9的正则表达式,是英文版的azw3格式,手机端使用kindle打开,pc端使用calibre软件打开

    C# System.Linq.Expressions表达式序列化源码

    `System.Linq.Expressions`命名空间是C#中的一个关键部分,它允许开发者创建和操作表达式树,这是Linq背后的核心技术。 **表达式树**是C#中一种特殊的对象结构,它表示可执行的代码,就像一棵树形结构,每个节点都...

    emmet(zen-coding)低版本eclipse自编译版

    亲测可用,没改任何源码,不嫌麻烦的童鞋可以下载源码,然后修改MANIFEST.MF文件Require-Bundle:下的 org.eclipse.core.expressions 把 bundle-version 改低(例如我把原来的3.4.200改成了3.4.200)保存之后右键项目...

    geomesa-geospark:整合Geomesa和Geospark

    执行使用: make run失败于ClassCastException: org.apache.spark.sql.catalyst.expressions.UnsafeArrayData cannot be cast to org.apache.spark.sql.catalyst.InternalRow当不使用单独的注册器时。 按照建议进行...

    Jeffrey E. F. Friedl - Mastering.Regular.Expressions.3rd.Edition

    Regular expressions are an extremely powerful tool for manipulating text and data. They are now standard features in a wide range of languages and popular tools, including Perl, Python, Ruby, Java, VB...

    Regular.Expressions

    正则表达式(Regular Expressions,简称regex)是编程领域中一种强大的文本处理工具,它用于模式匹配、数据提取、验证输入等任务。这个“Regular.Expressions”资料包显然是为开发者设计的,旨在深入理解正则表达式...

    Eclipse plug-in通过PropertyTest控制菜单权限

    创建自定义PropertyTester需要继承`org.eclipse.core.expressions.PropertyTester`接口,并在`test`方法中实现自己的逻辑。例如,你可以检查当前登录用户的权限级别,或者检查是否存在某个特定的项目或文件。 3. **...

    drools使用的jar包

    drools使用的jar包,运行官方drools-distribution-7.7.0.Final drools使用的jar包,运行官方drools-distribution-7.7.0.Final drools使用的jar包,运行官方drools-distribution-7.7.0.Final drools使用的jar包,运行...

    Wrox.Beginning.Regular.Expressions.Feb.2005.rar

    《Wrox.Beginning.Regular.Expressions.Feb.2005》这本书是关于正则表达式的入门教程,出版于2005年2月,由Wrox出版社发行。正则表达式,简称“正则”或“regex”,是用于处理字符串的强大工具,广泛应用于数据验证...

    Eclipse插件\快捷键

    **下载地址**:[http://www.eclipse.org/downloads/index.php](http://www.eclipse.org/downloads/index.php) #### 2. LombOz for J2EE, JSP, EJB - **LombOz**:为 Eclipse 提供了对 J2EE 的支持,包括 JSP 和 EJB...

    apache依赖包.zip

    4. **pcre-8.41.tar.gz**: PCRE (Perl Compatible Regular Expressions) 是一个Perl库,包含C语言接口,用于处理正则表达式。Apache服务器中的模块,如mod_rewrite,依赖于PCRE库进行URL重写和其他复杂匹配任务。 5...

    Google C++ International Standard.pdf

    Contents Contents ii List of Tables x List of Figures xiv 1 Scope 1 2 Normative references 2 3 Terms and definitions 3 4 General principles 7 4.1 Implementation compliance . ....4.2 Structure of this ...

Global site tag (gtag.js) - Google Analytics