Community
Participate
Working Groups
Build Identifier: I20100608-0911 /** * */ package rcp.intro.runtime.command; import java.beans.Expression; import org.eclipse.swt.SWT; import org.eclipse.ui.menus.CommandContributionItem; import org.eclipse.ui.menus.CommandContributionItemParameter; import org.eclipse.ui.menus.ExtensionContributionFactory; import org.eclipse.ui.menus.IContributionRoot; import org.eclipse.ui.services.IServiceLocator; /** * @author shuklara * */ public class DeefineCommands extends ExtensionContributionFactory { /** * */ public DeefineCommands() { // TODO Auto-generated constructor stub } /* (non-Javadoc) * @see org.eclipse.ui.menus.AbstractContributionFactory#createContributionItems(org.eclipse.ui.services.IServiceLocator, org.eclipse.ui.menus.IContributionRoot) */ @Override public void createContributionItems(IServiceLocator serviceLocator, IContributionRoot additions) { CommandContributionItemParameter p = new CommandContributionItemParameter( serviceLocator, "", "org.eclipse.ui.file.exit", SWT.PUSH); p.label = "Exit the application"; p.icon = Activator.getImageDescriptor("icons/alt_window_16.gif"); CommandContributionItem item = new CommandContributionItem(p); item.setVisible(true); additions.addContributionItem(item,null); } } Reproducible: Always Steps to Reproduce: 1.above is the snap shot of code and error occur in the line additions.addContributionItem(item,null); let me know the way to resolve this error as soon as possible
Like the error message says, the org.eclipse.core.expressions.Expression class isn't visible. You need to adjust your bundle manifest. If you add that package (or its bundle) to the manifest's imports then it will work. In the future please use the bug reporting system to report bugs only. If you have a question or need help please use IRC [1] or the Eclipse newsgroups [2]. [1] http://wiki.eclipse.org/IRC [2] http://eclipse.org/forums/