|
From: Christopher W. <caw...@us...> - 2005-09-18 18:46:24
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/infoviews In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8263/src/org/rubypeople/rdt/internal/ui/infoviews Modified Files: RIView.java Log Message: add action to generate Rdoc for a project. Have RIView sign up as a lsitener for when user generates Rdoc, so we can auto-update our view after it is finished. Index: RIView.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/infoviews/RIView.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RIView.java 10 Sep 2005 00:13:25 -0000 1.7 --- RIView.java 18 Sep 2005 18:46:10 -0000 1.8 *************** *** 9,12 **** --- 9,13 ---- import java.util.Collection; import java.util.Iterator; + import java.util.List; import org.eclipse.core.runtime.IPath; *************** *** 43,49 **** import org.rubypeople.rdt.internal.ui.RubyPlugin; import org.rubypeople.rdt.internal.ui.RubyPluginImages; import org.rubypeople.rdt.ui.PreferenceConstants; ! public class RIView extends ViewPart { private boolean riFound = false; --- 44,52 ---- import org.rubypeople.rdt.internal.ui.RubyPlugin; import org.rubypeople.rdt.internal.ui.RubyPluginImages; + import org.rubypeople.rdt.internal.ui.rdocexport.RDocUtility; + import org.rubypeople.rdt.internal.ui.rdocexport.RdocListener; import org.rubypeople.rdt.ui.PreferenceConstants; ! public class RIView extends ViewPart implements RdocListener { private boolean riFound = false; *************** *** 54,58 **** private TableViewer searchListViewer; private Browser searchResult; ! private java.util.List possibleMatches = new ArrayList(); private SearchValue itemToSearch = new SearchValue(); private DescriptionUpdater descriptionUpdater = new DescriptionUpdater(); --- 57,61 ---- private TableViewer searchListViewer; private Browser searchResult; ! private List possibleMatches = new ArrayList(); private SearchValue itemToSearch = new SearchValue(); private DescriptionUpdater descriptionUpdater = new DescriptionUpdater(); *************** *** 150,153 **** --- 153,157 ---- updatePage(); descriptionUpdater.start(); + RDocUtility.addRdocListener(this); } *************** *** 161,165 **** refreshAction.setToolTipText("Refresh list of names"); refreshAction.setImageDescriptor(RubyPluginImages.TOOLBAR_REFRESH); ! IToolBarManager manager = getViewSite().getActionBars().getToolBarManager(); manager.add(refreshAction); --- 165,169 ---- refreshAction.setToolTipText("Refresh list of names"); refreshAction.setImageDescriptor(RubyPluginImages.TOOLBAR_REFRESH); ! IToolBarManager manager = getViewSite().getActionBars().getToolBarManager(); manager.add(refreshAction); *************** *** 235,239 **** } protected String getArgString() { ! return "--no-pager -l"; } }; --- 239,243 ---- } protected String getArgString() { ! return "--no-pager -l "; } }; *************** *** 243,247 **** private void filterSearchList() { ! java.util.List filteredList = new ArrayList(); String text = searchStr.getText(); for (Iterator iter = possibleMatches.iterator(); iter.hasNext();) { --- 247,251 ---- private void filterSearchList() { ! List filteredList = new ArrayList(); String text = searchStr.getText(); for (Iterator iter = possibleMatches.iterator(); iter.hasNext();) { *************** *** 444,446 **** --- 448,457 ---- } } + + /** + * When teh rdoc has changed, automatically update/regenerate the view + */ + public void rdocChanged() { + updatePage(); + } } \ No newline at end of file |