How do I create a context sensitive help in Run Configurations? - eclipse

I have to create the help in Run Configurations on my plugin. As the same as this picture.
http://i.stack.imgur.com/bU5xL.png
I have searched on many sites include Google, or in textbooks,
but I haven't found how I do it. What should I do ? or Do you have any suggestions?
Thank you in advance.

This is done using the normal Eclipse context help system.
You specify the help context id in the org.eclipse.debug.ui.launchConfigurationTabGroups extension point using the helpContextId of the launchConfigurationTabGroup
Example from JUnit:
<extension
point="org.eclipse.debug.ui.launchConfigurationTabGroups">
<launchConfigurationTabGroup
type="org.eclipse.jdt.junit.launchconfig"
helpContextId="org.eclipse.jdt.junit.junit_tab_group"
class="org.eclipse.jdt.internal.junit.launcher.JUnitTabGroup"
id="org.eclipse.jdt.junit.launchConfigurationTabGroup.junit">
<launchMode
perspective="org.eclipse.debug.ui.DebugPerspective"
description="%JUnitTabGroupDescription.debug"
mode="debug">
</launchMode>
<launchMode
description="%JUnitTabGroupDescription.run"
mode="run">
</launchMode>
</launchConfigurationTabGroup>
</extension>
Use the org.eclipse.help.contexts extension point to declare a file containing the context help ids:
<extension point="org.eclipse.help.contexts">
<contexts file="contexts_JDT_JUnit.xml" plugin="org.eclipse.jdt.junit"/>
</extension>
and the context file contents:
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.contexts"?>
<contexts>
<context id="junit_tab_group">
<description>This launch configuration runs JUnit tests.</description>
<topic label="Using JUnit" href="gettingStarted/qs-junit.htm"/>
</context>
</contexts>
see the Eclipse help for more details.

Related

How to hide help content in an eclipse RCP?

In my eclipse based RCP Application, I want to hide unwanted help contents.
The help content is added via the org.eclipse.help.toc extension point from other plug-ins.
<extension point="org.eclipse.help.toc">
<toc file="help/toc.xml" primary="true">
</toc>
</extension>
I tried to disable it by activities:
<extension point="org.eclipse.ui.activities">
<activity id="disable" name="Disable">
</activity>
<activityPatternBinding activityId="disable"
pattern=".*/org.eclipse.help.toc">
</activityPatternBinding>
</extension>
But no success.
Help content contributions cannot be controlled by activities.
You simply need to exclude the help plug-ins (e.g. org.eclipse.jdt.doc.* for JDT documentation) from the runtime and the corresponding TOC entries will vanish.
I had the same issue and found the solution. You have to set the content to be hidden with HELP_DATA (link).
Here's my helpData.xml content:
<extensions>
<hidden>
<toc id="/org.eclipse.platform.doc.user/toc.xml"/>
</hidden>
</extensions>
and then refer to it in plugin_customization.ini:
org.eclipse.help/HELP_DATA = helpData.xml
and reference your plugin_customization.ini in your eclipse.ini or in the vm arguments of your launch config as
-Declipse.pluginCustomization=${workspace_loc}/com.castortech.iris.vision/plugin_customization.ini

Joomla 3.1.4 ,JInstaller: :Install: Cannot find Joomla XML setup file,error

I have setup already joomla 3.1.4 and I tried to install a plugin,But Im getting this error:
JInstaller: :Install: Cannot find Joomla XML setup file
This is my xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.5//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.5/template-install.dtd">
<extension version="3.1" type="plugin" group="content" client="myjoomlasite">
<name>plg_content_helloworld</name>
<author>Tahsin Çetin</author>
<creationDate>July 27th,2013</creationDate>
<copyright>Tahsin Çetin</copyright>
<licence>GNU General Public License</licence>
<authorEmail>tcetin#yandex.com</authorEmail>
<authorUrl>http://tahsincetin.com</authorUrl>
<version>1.1.0</version>
<description>Simple Hello World plugin</description>
<files>
<filename plugin="helloworld">helloworld.php</filename>
<filename>index.html</filename>
<filename>helloworld.xml</filename>
</files>
</extension>
You do not need to specify "helloworld.xml" in your xml file.Remove file and install again.This will be your final xml file-
<?xml version="1.0" encoding="UTF-8"?>
<extension version="3.1" type="plugin" group="content" client="myjoomlasite">
<name>plg_content_helloworld</name>
<author>Tahsin Çetin</author>
<creationDate>July 27th,2013</creationDate>
<copyright>Tahsin Çetin</copyright>
<licence>GNU General Public License</licence>
<authorEmail>tcetin#yandex.com</authorEmail>
<authorUrl>http://tahsincetin.com</authorUrl>
<version>1.1.0</version>
<description>Simple Hello World plugin</description>
<files>
<filename plugin="helloworld">helloworld.php</filename>
<filename>index.html</filename>
</files>
</extension>
Hope this will help.
The "Cannot find Joomla XML setup file" usually means you are trying to install an extension that wasn't designed for the version of Joomla you are installing to.
Read more here
In your opening <extension> tag, you do not need to specify a client attribute.
Where is the XML file in relation to your ZIP package? If it isn't at the top level of the ZIP, it won't be found.
Generally when this happens something is wrong with the XML file. If you have made any changes, try to think where those changes were and find a problem with the XML file.
Problems could be:
No opening or closing tag. Closing tags are easy to miss. Count them, make sure there's an opening and a closing tag.
Duplicated tags. It's easy to add two labels or showons for example, especially if you are copying and pasting.
Space before the opening XML tag
No closing fieldset tag
No closing extension or config tag. Easily deleted if you are replacing the file
You can easily use a tool like this:
https://www.w3schools.com/xml/xml_validator.asp
Which will help you to find issues such as missing opening and closing tags.

Optional extension points in plugin.xml

I want to define an extension point in my plugin.xml which is not available in my target platform. This is fine for me, because I want to take advantage of it only if it's available .
However ,when I add it Eclipse flags it with an error
Unknown extension point: 'org.eclipse.ui.trace.traceComponents'
Can I somehow mark this extension point as optional? I know that I can reduce the Unresolved extension points severity per-workspace or per-project, but I'd rather not do that for just one error.
The complete plugin.xml is
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
id="org.apache.sling.slingclipse.preferences"
name="Slingclipse Preferences"
point="org.eclipse.ui.preferencePages">
<page
name="Slingclipse"
class="org.apache.sling.slingclipse.preferences.SlingclipsePreferencePage"
id="org.apache.sling.slingclipse.preferences.defaultPreferences">
</page>
</extension>
<extension
point="org.eclipse.core.runtime.preferences">
<initializer
class="org.apache.sling.slingclipse.preferences.PreferenceInitializer">
</initializer>
</extension>
<extension
point="org.eclipse.ui.startup">
<startup
class="org.apache.sling.slingclipse.SlingclipseStrartup">
</startup>
</extension>
<extension
point="org.eclipse.ui.importWizards">
<category
id="org.apache.sling.slingclipse.ui.wizards.sampleCategory"
name="Sling">
</category>
<wizard
category="org.apache.sling.slingclipse.ui.wizards.sampleCategory"
class="org.apache.sling.slingclipse.ui.wizards.ImportWizard"
icon="icons/sample.gif"
id="org.apache.sling.slingclipse.ui.wizards.ImportWizard"
name="Import from Repository">
<description>
Import a file from the local file system into the workspace.
</description>
</wizard>
</extension>
<extension
point="org.eclipse.ui.trace.traceComponents">
<component
id="org.eclipse.ui.trace.tracingPrefPage"
label="Slingclipse">
<bundle
name="org.apache.sling.slingclipse"></bundle>
</component>
</extension>
</plugin>
You are mixing two concepts here: Development time versus runtime.
Extension points are dependencies declared at development time. Therefore you should have the plugin defining that extension point in your target platform at development time. But you are right, you can generally write the manifest XML for extending that extension point without it being available. In practice this does not work well because many extension points require to implement an interface which itself is also defined in the (non existing) plugin.
To make the functionality be optional for a user (and to not force him to have the defining plugin), you need to make the installation of your plugin optional. But that is not related to the manifest and the use of extension points at all. E.g. you have to declare a feature containing your plugin and make that feature depend on the feature containing the plugin defining the extension point.

A working example of custom p2 provisioning action

I’m trying to write a custom p2 provisioning action to execute my own code when installing feature. Doing so with installHandler for Update Manager was easy, but as for p2, there’s absolutely no docs on this topic in the web, most of the time eclispe just silently ignores me (even in a log), and the only example I’ve found is not working.
So, if somebody can point me at a working example of custom provisioning action, that would help me understand the whole thing.
Thanks.
Finally, I’ve got it working somehow:
example_plugin:
plugin.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.5"?>
<plugin>
<extension point="org.eclipse.equinox.p2.engine.touchpoints" id="example" name="Eclipse Touchpoint">
<touchpoint type="com.company.example.plugin" class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint" version="1.0"/>
</extension>
<extension point="org.eclipse.equinox.p2.engine.actions">
<action
class="com.company.example.plugin.CustomAction"
name="do_custom_action"
touchpointType="com.company.example.plugin"
touchpointVersion="1.0"
version="1.0">
</action>
</extension>
</plugin>
META-INF\p2.xml:
provides.0.namespace=com.company.example.plugin
provides.0.name=do_custom_action
provides.0.version=1.0
example_feature:
feature.xml:
<?xml version="1.0" encoding="UTF-8"?>
<feature id="com.company.example.feature" label="Maven installer feature" version="2.2.1.qualifier">
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
<license url="http://www.example.com/license">[Enter License Description here.]</license>
<requires>
<import plugin="com.company.example.plugin"/>
</requires>
<plugin
id="com.company.example.plugin"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>
p2.inf:
metaRequirements.0.namespace=com.company.example.plugin
metaRequirements.0.name=do_custom_action
metaRequirements.0.range=1.0
instructions.configure = com.company.example.plugin.do_custom_action();
General comments:
Custom touchpoint action is stored in a plugin as a regular class.
Update site must contain proper artifacts.jar/content.jar (don’t know why, took a lot of time to debug this).
If you want to let your touch point action working, there are two approaches,
install your plug-in firstly that provides the new touchpoint action. Then install the contents from the repository using the new touchpoint action.
the iu depending on the new touchpoint action need require the bundle provides the new touchpoint action, it exactly likes what you found. See the example code attached by Simon Kaegi

Buckminster RCP simple project materialization

After watching the webinar, skimming over the BuckyBook PDF, and following the Eclipse RCP build tutorial, I still don't know how to materialize a simple RCP plug-in project from CVS into an eclipse workspace.
Does anyone have an example with a CQUERY and an RMAP file, for a simple one project workspace?
Its actually easy.
Here is a sample CSPEC:
<?xml version="1.0" encoding="UTF-8"?>
<cq:componentQuery xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0" resourceMap="example-site.rmap">
<cq:rootRequest name="example-site" componentType="eclipse.feature"/>
</cq:componentQuery>
Note the root request name property points to a component. If you have an RCP app which has a main bundle (say one that is the launching point to your app), then you would point to this component using the name property above. This CSPEC will then download all dependent components using the RMAP below, using search paths, providers etc.
The RMAP:
<searchPath name="default">
<provider
readerType="cvs"
componentTypes="osgi.bundle,eclipse.feature"
source="true"
mutable="true">
<uri format=":pserver:anon#cvs.local:/opt/data/cvsroot,{0}/">
<bc:propertyRef key="buckminster.component" />
</uri>
</provider>
</searchPath>
<searchPath name="galileo">
<provider readerType="eclipse.import" componentTypes="osgi.bundle,eclipse.feature"
mutable="false" source="false">
<uri format="http://download.eclipse.org/releases/galileo?importType=binary"/>
</provider>
</searchPath>
<locator searchPathRef="default" pattern="^example\-.*" />
<locator searchPathRef="galileo" failOnError="false" />