Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8947315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:43:42+00:00 2026-06-15T12:43:42+00:00

I’m trying to add a Menu Item to the Run Menu in Eclipse via

  • 0

I’m trying to add a Menu Item to the Run Menu in Eclipse via a plugin.

However, I only want this Item to appear when I’m in the “Report Design” perspective (this is for BIRT).
Secondly, (if possible) I’d like the menu item to be only enabled if the extension of the open file is .rptdesign.

I’m not having any luck using either of the visibility or visibleWhen elements in the plugin.xml

Any hints appreciated,
Ro

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T12:43:43+00:00Added an answer on June 15, 2026 at 12:43 pm

    Eventually got it, here’s what I had to do…..

    Create the Command

    <extension
         point="org.eclipse.ui.commands">
      <command
            name="Deploy"
            icon="icons/deploy.gif"
            style="push"
            id="com.test.deployCommand">
      </command>
    

    Create the Handler for the command

    <extension
         point="org.eclipse.ui.handlers">
      <handler
            commandId="com.test.deployCommand"
            class="com.test.DeployHandler">
      </handler>
    

    Add an existing property tester available in BIRT (to test the file type) – Would not work if i changed the namespace parameter

    <extension
        point="org.eclipse.core.expressions.propertyTesters">
     <propertyTester
           class="org.eclipse.birt.report.debug.internal.ui.script.ScriptDebuggerPropertyTester"
           id="com.test.propertyTester1"
           namespace="scriptdebug"
           properties="isRptdesign"
           type="org.eclipse.core.runtime.IAdaptable">
     </propertyTester>
    

    Added two definitions

    <extension point="org.eclipse.core.expressions.definitions">
      <definition id="com.test.inRptDesignPerspective">
        <with variable="activeWorkbenchWindow.activePerspective">
          <equals value="org.eclipse.birt.report.designer.ui.ReportPerspective"/>
        </with>
      </definition>
      <definition id="com.test.inRptDesignFile">
        <with variable="selection">
        <count value="1" />
        <iterate>
           <and>
             <test property="scriptdebug.isRptdesign" />
           </and>
         </iterate>
        </with>
      </definition>
    </extension>
    

    On my menu extension, added a setting to the command, marking when its visible

    <extension
         point="org.eclipse.ui.menus">
         <menuContribution locationURI="menu:org.eclipse.ui.main.menu" id="com.test.contribution2">
         <menu
              id="org.eclipse.ui.run"
              label="Run"
              path="additions">
            <groupMarker
                 name="preview">
           </groupMarker>
            <command
                  commandId="com.test.deployCommand"
                  icon="icons/deploy.gif"
                  id="com.test.deployCommand"
                  menubarPath="org.eclipse.ui.run/preview"
                  style="push"
                  class="com.test.DeployHandler">
                  <visibleWhen>
                  <and>
                    <reference definitionId="com.test.inRptDesignPerspective"/>
                    <reference definitionId="com.test.inRptDesignFile"/>
                  </and>
               </visibleWhen>
             </command>
           </menu>
         </menuContribution>
    

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.