public SetQueryAction(IWorkbenchPartSite workbenchPartSite) { site = workbenchPartSite; setText(FLATTT.getResourceString("actions.SetQueryAction.Top.Label")); setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin(FLATTT.ID_PLUGIN, "icons/magnifier.png")); setToolTipText(FLATTT.getResourceString("actions.SetQueryAction.Top.ToolTip")); }
/* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ public void run() { // (IAction action) { SearchDialog dialog = new SearchDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "FLATTT Lucene Analysis", "Enter query:", FLATTTLuceneAnalysis.getSearchString(), null); dialog.open(); if (dialog.getReturnCode() == Window.OK) { LuceneIndexer.setIndexDir( FLATTT .singleton() .getStateLocation() .append("luceneindex") .toFile()); // TODO: should this be the projectname? or do we want one index for the // whole workspace? // Do the search when done indexing UIJob job = new SearchJob(dialog.getValue()); FLATTT.nextSearch = job; // job.schedule(); // Index if needed try { LuceneIndexer.checkIfIndexed(); } catch (Exception e) { e.printStackTrace(); } } };
public UnlinkElementsAction() { setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin(FLATTT.ID_PLUGIN, "icons/link_break.png")); setText(FLATTT.getResourceString("actions.UnlinkElementsAction.ToolTip")); // We want to be notified when the active concern model changes ConcernModelFactory.singleton().addListener(this); concernModelProvider = ConcernModelFactory.singleton(); // We want to be notified when any concerns or links are // changed in the active concern model concernModelProvider.getModel().addListener(this); }
/* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow) */ public void init(IWorkbenchWindow window) { setText(FLATTT.getResourceString("actions.SetQueryAction.Top.Label")); setToolTipText(FLATTT.getResourceString("actions.SetQueryAction.Top.ToolTip")); }
protected static String getNewConcernMenuItemText() { return FLATTT.getResourceString("actions.EditorLinkAction.NewConcern"); }