"Unknown extension point" in plugin.xml problem - eclipse

In "Contributing to Eclipse" book it is written that to introduce an extension point you should type the next section in plugin.xml
<extension point="org.eclipse.contribution.junit.listeners">
<listener
class="org.eclipse.contribution.junit.RunTestAction$Listener">
</listener>
</extension>
But this code gives me the "Unknown extension point" error".

Read the book carefully, extension point is defined in the same plugin.xml as <extension-point id="listeners" name="Test Listeners"/>
Get sample code from Downloads at http://www.informit.com/store/product.aspx?isbn=0321205758
<?xml version="1.0" encoding="UTF-8"?>
<plugin
id="org.eclipse.contribution.junit"
name="JUnit Plug-in"
version="1.0.0"
provider-name=""
class="org.eclipse.contribution.junit.JUnitPlugin">
<runtime>
<library name="contribjunit.jar">
<export name = "*"/>
</library>
</runtime>
<requires>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.jdt.core"/>
<import plugin="org.junit"/>
<import plugin="org.eclipse.debug.core"/>
<import plugin="org.eclipse.jdt.launching"/>
</requires>
<extension-point id="listeners" name="Test Listeners"/>
<extension point="org.eclipse.ui.popupMenus">
<objectContribution
objectClass="org.eclipse.jdt.core.IType"
id="org.eclipse.contribution.junit.runtest">
<action
label="Run Test"
class="org.eclipse.contribution.junit.RunTestAction"
enablesFor="1"
id="org.eclipse.contribution.junit.runtest.action">
</action>
</objectContribution>
</extension>
<extension point="org.eclipse.contribution.junit.listeners">
<listener
class="org.eclipse.contribution.junit.RunTestAction$Listener">
</listener>
</extension>
</plugin>
Cheers,
Max

Related

Eclipse - how to reference current feature version inside feature manifest

Inside Enide Node.js feature manifest I am referencing "org.nodeclipse" feature.
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.nodeclipse.enide.nodejs.feature"
label="Enide Node.js"
version="0.10.0.qualifier"
...
<!-- http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Ffeature_manifest.html -->
<requires>
<import feature="org.chromium.sdk" version="0.3.9" match="compatible"/>
<import feature="org.chromium.debug" version="0.3.9" match="compatible"/>
<import feature="org.nodeclipse" version="0.10.0" match="perfect"/>
<import feature="com.eclipsesource.jshint.feature" version="0.9.9" match="greaterOrEqual"/>
The intention is that "org.nodeclipse" is updated with "org.nodeclipse.enide.nodejs.feature" and must be of the same version.
Can I reference version like version=feature.version match="perfect" ?

Cannot create Azure Service Project Package using Azure CmdLets

I have a cloud service project in VS 2013 RTM.
I use Save-AzureServiceProjectPackage -Local command to generate CSPKG package. I am getting following error. Not sure why. Can anybody help.
Here is my Cloud CSCFG File -
<?xml version="1.0" encoding="utf-8"?>
<ServiceConfiguration serviceName="WindowsAzure1" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="4" osVersion="*" schemaVersion="2013-10.2.2">
<Role name="WebRole1">
<Instances count="1" />
<ConfigurationSettings>
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
</ConfigurationSettings>
</Role>
</ServiceConfiguration>
And here is my Service Definition CSDEF file -
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="WindowsAzure1" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2013-10.2.2">
<WebRole name="WebRole1" vmsize="Small">
<Sites>
<Site name="Web">
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" />
</Bindings>
</Site>
</Sites>
<Endpoints>
<InputEndpoint name="Endpoint1" protocol="http" port="80" />
</Endpoints>
<Imports>
<Import moduleName="Diagnostics" />
</Imports>
</WebRole>
</ServiceDefinition>
Appreciate any help.
The latest version of Windows Azure PowerShell doesn't support packaging VS projects. The new version which will be early December 2013 will have this support.

Trying to put new "Generate" option under Source menu in Eclipse

I'm trying to add a new "Generate..." option under the Source menu when you right-click on a Java file. At this point, I'm just trying to get the menu option to show up but I haven't had success yet.
Is there something wrong with my plugin.xml file below as far as you can see?
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension point="org.eclipse.ui.popupMenus">
<objectContribution
id="GenerateBuilderPlugin.contribution1"
objectClass="org.eclipse.core.resources.IFile">
<action
class="generatebuilderplugin.popup.actions.GenerateBuilder"
enablesFor="1"
id="GenerateBuilderPlugin.newAction"
label="Generate Builder..."
menubarPath="org.eclipse.jdt.ui.source.menu/generateGroup">
</action>
</objectContribution>
</extension>
</plugin>
I ended up going with the "Hello, World Command" template and adjusting for my needs.
Below is the updated plugin.xml that successfully displays the a new "Generate..." option on the Source menu. One just basically needs to setup a command and a handler class that does the actual work. I'd recommend just following the "Hello, World Command" plugin template and tweaking for your needs.
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension point="org.eclipse.ui.commands">
<command
name="Generate Builder..."
id="GenerateBuilderProject.commands.GenerateBuilder">
</command>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
commandId="GenerateBuilderProject.commands.GenerateBuilder"
class="generatebuilderproject.handlers.GenerateBuilderHandler">
</handler>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:org.eclipse.jdt.ui.source.menu?after=generateGroup">
<command
commandId="GenerateBuilderProject.commands.GenerateBuilder"
id="GenerateBuilder.menus.GenerateBuilder">
</command>
</menuContribution>
</extension>
</plugin>

How to override keybindings from a parent scheme in Eclipse 4?

I am upgrading an RCP application to use Eclipse 4.2.1. One of the problems I am having is that keybindings in my custom scheme are no longer overriding Eclipse key bindings.
I have reproduced the problem in a sample plug-in project. This was created by following, then adapting, this tutorial. I can't attach the project itself, so have just included the contents of the plugin.xml file.
I have my own scheme which extends the default scheme:
<scheme
id="test.MyScheme"
name="My Scheme"
parentId="org.eclipse.ui.defaultAcceleratorConfiguration">
</scheme>
I have a command with the key binding Ctrl+N:
<key
commandId="test.MyCommand"
contextId="org.eclipse.ui.contexts.window"
schemeId="test.MyScheme"
sequence="M1+N">
</key>
In Eclipse 3.7.2, pressing Ctrl+N would run my command.
In Eclipse 4.2.1, it pops up a box asking me to choose between running my command and launching the 'New' wizard. What do I need to do to restore the original behaviour?
Full contents of plugin.xml below.
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
id="application"
point="org.eclipse.core.runtime.applications">
<application>
<run
class="test.Application">
</run>
</application>
</extension>
<extension
point="org.eclipse.ui.perspectives">
<perspective
name="RCP Perspective"
class="test.Perspective"
id="test.perspective">
</perspective>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
defaultHandler="test.MyCommandHandler"
id="test.MyCommand"
name="My Command">
</command>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="menu:org.eclipse.ui.main.menu">
<menu
id="fileMenu"
label="File">
<command
commandId="test.MyCommand"
label="My Command"
style="push">
</command>
</menu>
</menuContribution>
</extension>
<extension
point="org.eclipse.ui.bindings">
<key
commandId="test.MyCommand"
contextId="org.eclipse.ui.contexts.window"
schemeId="test.MyScheme"
sequence="M1+N">
</key>
<scheme
id="test.MyScheme"
name="My Scheme"
parentId="org.eclipse.ui.defaultAcceleratorConfiguration">
</scheme>
</extension>
<extension
id="product"
point="org.eclipse.core.runtime.products">
<product
application="test.application"
name="My Product">
<property
name="appName"
value="My Product">
</property>
<property
name="preferenceCustomization"
value="plugin_customization.ini">
</property>
</product>
</extension>
</plugin>
The old mechanism appears to just not work but there is another way.
Add an extension org.eclipse.e4.workbench.model
Add a processor fragment
Find the offending key binding: MAppliction->MBindingTable->MKeyBinding
Remove the key binding from the binding table
The following file might be missing inside your plugin directory next to the plugin.xml:
plugin_customization.ini
Its content should be:
org.eclipse.ui/KEY_CONFIGURATION_ID=test.MyScheme
See also, this tutorial and the chapter here.

Devolping Eclipse Plugin. Create Subcategory in plugin.xml

This is my plugin.xml
<plugin>
<extension point="org.eclipse.ui.newWizards">
<category
id="root"
name="Root Category">
</category>
<category
id="first_subcategory"
name="Sub Category"
parentCategory="root">
</category>
<wizard
id="first_leaf_of_subcategory"
name="Wizard of First Subcategory"
category="root/first_subcategory"
icon="./icons/sample.gif"
class="com.myplugin.WizFirstSubCategory"
project="true"
>
<description>
Create a simple wizard of First Subcategory
</description>
</wizard>
</extension>
</plugin>
Whe I run My plugin as Eclipse Application I don't find the three that I wrote.
I want "New-->Project" open wizard that have inside "Root Category-->Sub Category-->Wizard of First Subcategory" but doesn't work
If I delete Subcategory and reference first_leaf_of_subcategory directly at root plugin works if i insert a subcategory doesn't works.
I read documentation Here
Thanks
finally this tree works for me.
<plugin>
<extension point="org.eclipse.ui.newWizards">
<!-- ROOT CATEGORY -->
<category
id="root_category"
name="Root Category">
</category>
<!-- FIRST SUB CATEGORY -->
<category
id="first_sub_category"
name="First Sub Category"
parentCategory="root_category">
</category>
<wizard
id="firstWizS1"
name="First Wiz S1"
category="root_category/first_sub_category"
icon="./icons/firstWizS1.png"
class="com.mycategory.FirstWizS1"
project="true">
</wizard>
<wizard
id="secondWizS1"
name="Second Wiz S1"
category="root_category/first_sub_category"
icon="./icons/secondWizS1.png"
class="com.mycategory.SecondWizS1"
project="true">
</wizard>
<!-- SECOND SUB CATEGORY -->
<category
id="second_sub_category"
name="Second Sub Category"
parentCategory="root_category">
</category>
<wizard
id="firstWizS2"
name="First Wiz S2"
category="root_category/second_sub_category"
icon="./icons/firstWizS2.png"
class="com.mycategory.FirstWizS2"
project="true">
</wizard>
<wizard
id="secondWizS1"
name="Second Wiz S1"
category="root_category/second_sub_category"
icon="./icons/secondWizS2.png"
class="com.mycategory.SecondWizS2"
project="true">
</wizard>
</extension>
</plugin>