<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
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.