How change default value in DSE? [message #556680] |
Thu, 02 September 2010 06:29  |
Eclipse User |
|
|
|
Hi all,
I'm working about a new plugin that uses the Eclipse DSE for Galileo.
I'm trying to change the default value for the Show Category because I don't want view themes. Is it possible? If yes how?
I've tried to modify the dse plugin.xml (org.eclipse.datatools.connectivity.ui.dse_1.1.3.v2010012703 23.jar) adding a parameter to the command 'showCategory' but nothing happens:
<menuContribution
locationURI=" menu:org.eclipse.datatools.connectivity.DataSourceExplorerNa vigator?before=slot3 ">
<command
commandId="org.eclipse.datatools.connectivity.commands.showcategory "
hoverIcon="icons/full/clcl16/extensions.gif"
icon="icons/full/elcl16/extensions.gif"
id="org.eclipse.datatools.connectivity.view.menu.showcategory "
label="%DSE.ShowCategory_nm.label"
mnemonic="%DSE.ShowCategory_m.label"
style="toggle"
tooltip="%DSE.ShowCategory.tooltip">
<!-- test anto -->
<parameter name="org.eclipse.datatools.connectivity.ui.ignoreCategory"
value="true">
</parameter>
</command>
</menuContribution>
How can I do this?
Thanks,
Antonella
|
|
|
Re: How change default value in DSE? [message #558013 is a reply to message #556680] |
Thu, 09 September 2010 15:09  |
Eclipse User |
|
|
|
Hi Antonella,
Well, the ShowCategoryAction is a special action that's handled in the
view class itself. But the good thing is that it's handled using a
command that can be overridden...
If you look at the plugin.xml for
org.eclipse.datatools.connectivity.ui.dse, you'll see a command handler
is registered:
<extension
point="org.eclipse.ui.commands">
<command
defaultHandler=" org.eclipse.datatools.connectivity.ui.dse.actions.ShowCatego ryAction "
description="%DSE.ShowCategory.command.description"
id="org.eclipse.datatools.connectivity.commands.showcategory "
name="%DSE.ShowCategory.command.label">
</command>
</extension>
You can actually override that command handler to at least disable it,
but I don't see a way the way it stands to override the actual default
to be "false" and thus not show the categories.
The extension would look something like this:
<extension
point="org.eclipse.ui.handlers">
<handler
class="my.pkg.MyHandler"
commandId="org.eclipse.datatools.connectivity.commands.showcategory ">
<activeWhen>
<with variable="activePartId">
<equals
value=" org.eclipse.datatools.connectivity.DataSourceExplorerNavigat or "/>
</with>
</activeWhen>
</handler>
</extension>
Can you create a bugzilla for this issue and we'll see if we can get it
fixed in the next maintenance (DTP 1.8.2 is due out in February and I
know I won't get it fixed for 1.8.1 which is due out in just a couple of
weeks)?
--Fitz
Antonella wrote:
> Hi all,
> I'm working about a new plugin that uses the Eclipse DSE for Galileo.
>
> I'm trying to change the default value for the Show Category because I
> don't want view themes. Is it possible? If yes how?
>
> I've tried to modify the dse plugin.xml
> (org.eclipse.datatools.connectivity.ui.dse_1.1.3.v2010012703 23.jar)
> adding a parameter to the command 'showCategory' but nothing happens:
>
> <menuContribution
> locationURI="
> menu:org.eclipse.datatools.connectivity.DataSourceExplorerNa
> vigator?before=slot3 ">
> <command
>
> commandId="org.eclipse.datatools.connectivity.commands.showcategory "
> hoverIcon="icons/full/clcl16/extensions.gif"
> icon="icons/full/elcl16/extensions.gif"
> id="org.eclipse.datatools.connectivity.view.menu.showcategory "
> label="%DSE.ShowCategory_nm.label"
> mnemonic="%DSE.ShowCategory_m.label"
> style="toggle"
> tooltip="%DSE.ShowCategory.tooltip">
> <!-- test anto -->
> <parameter
> name="org.eclipse.datatools.connectivity.ui.ignoreCategory"
> value="true">
> </parameter>
> </command>
> </menuContribution>
>
> How can I do this?
>
> Thanks,
>
> Antonella
>
|
|
|
Powered by
FUDForum. Page generated in 0.07154 seconds