You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(41) |
Apr
(9) |
May
|
Jun
|
Jul
(39) |
Aug
(38) |
Sep
(135) |
Oct
(220) |
Nov
(75) |
Dec
(74) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(44) |
Feb
(160) |
Mar
(49) |
Apr
(69) |
May
(40) |
Jun
(52) |
Jul
(47) |
Aug
(51) |
Sep
(19) |
Oct
(22) |
Nov
(36) |
Dec
(76) |
| 2007 |
Jan
(154) |
Feb
(165) |
Mar
(186) |
Apr
(143) |
May
(175) |
Jun
(133) |
Jul
(203) |
Aug
(177) |
Sep
(136) |
Oct
|
Nov
|
Dec
|
|
From: David C. <dc...@us...> - 2005-11-21 01:26:41
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9086 Modified Files: plugin.xml Log Message: Fixed (sub-optimally) bindings for Format and Toggle Comment on GTK. Index: plugin.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/plugin.xml,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** plugin.xml 20 Nov 2005 18:51:13 -0000 1.65 --- plugin.xml 21 Nov 2005 01:26:32 -0000 1.66 *************** *** 198,201 **** --- 198,222 ---- sequence="M1+M2+F" commandId="org.rubypeople.rdt.ui.edit.text.ruby.format" + platform="windows" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> + <key + sequence="M1+M2+F" + commandId="org.rubypeople.rdt.ui.edit.text.ruby.format" + platform="motif" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> + <key + sequence="M1+M2+F" + commandId="org.rubypeople.rdt.ui.edit.text.ruby.format" + platform="carbon" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> + <key + sequence="M1+M2+F" + commandId="org.rubypeople.rdt.ui.edit.text.ruby.format" + platform="photon" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> + <key + sequence="ESC M1+F" + commandId="org.rubypeople.rdt.ui.edit.text.ruby.format" + platform="gtk" schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> <key |
|
From: David C. <dc...@us...> - 2005-11-20 18:51:22
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6927 Modified Files: plugin.xml Log Message: Converted deprecated bindings to current style. Index: plugin.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/plugin.xml,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** plugin.xml 23 Oct 2005 19:47:24 -0000 1.64 --- plugin.xml 20 Nov 2005 18:51:13 -0000 1.65 *************** *** 194,197 **** --- 194,218 ---- </context> </extension> + <extension point="org.eclipse.ui.bindings"> + <key + sequence="M1+M2+F" + commandId="org.rubypeople.rdt.ui.edit.text.ruby.format" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> + <key + sequence="M1+/" + commandId="org.rubypeople.rdt.ui.edit.text.ruby.toggle.comment" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"> + </key> + <key + sequence="M1+M2+C" + commandId="org.rubypeople.rdt.ui.edit.text.ruby.toggle.comment" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"> + </key> + <key + sequence="M1+SPACE" + commandId="org.rubypeople.rdt.ui.edit.text.ruby.content.assist.proposals" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"> + </key> + </extension> <extension point="org.eclipse.ui.commands"> <category *************** *** 201,205 **** </category> <command - category="org.rubypeople.rdt.ui.category.source" categoryId="org.rubypeople.rdt.ui.category.source" description="%ActionDefinition.format.description" --- 222,225 ---- *************** *** 207,218 **** name="%ActionDefinition.format.name"> </command> - <keyBinding - keySequence="M1+M2+F" - scope="org.rubypeople.rdt.ui.rubyEditorScope" - command="org.rubypeople.rdt.ui.edit.text.ruby.format" - configuration="org.eclipse.ui.defaultAcceleratorConfiguration"> - </keyBinding> <command - category="org.rubypeople.rdt.ui.category.source" categoryId="org.rubypeople.rdt.ui.category.source" description="%ActionDefinition.comment.description" --- 227,231 ---- *************** *** 221,225 **** </command> <command - category="org.rubypeople.rdt.ui.category.source" categoryId="org.rubypeople.rdt.ui.category.source" description="%ActionDefinition.uncomment.description" --- 234,237 ---- *************** *** 228,232 **** </command> <command - category="org.rubypeople.rdt.ui.category.source" categoryId="org.rubypeople.rdt.ui.category.source" description="%ActionDefinition.toggleComment.description" --- 240,243 ---- *************** *** 234,251 **** name="%ActionDefinition.toggleComment.name"> </command> - <keyBinding - keySequence="M1+/" - scope="org.rubypeople.rdt.ui.rubyEditorScope" - command="org.rubypeople.rdt.ui.edit.text.ruby.toggle.comment" - configuration="org.eclipse.ui.defaultAcceleratorConfiguration"> - </keyBinding> - <keyBinding - keySequence="M1+M2+C" - scope="org.rubypeople.rdt.ui.rubyEditorScope" - command="org.rubypeople.rdt.ui.edit.text.ruby.toggle.comment" - configuration="org.eclipse.ui.defaultAcceleratorConfiguration"> - </keyBinding> <command - category="org.rubypeople.rdt.ui.category.source" categoryId="org.rubypeople.rdt.ui.category.source" description="%ActionDefinition.contentAssist.description" --- 245,249 ---- *************** *** 253,262 **** name="%ActionDefinition.contentAssist.name"> </command> - <keyBinding - keySequence="M1+SPACE" - scope="org.rubypeople.rdt.ui.rubyEditorScope" - command="org.rubypeople.rdt.ui.edit.text.ruby.content.assist.proposals" - configuration="org.eclipse.ui.defaultAcceleratorConfiguration"> - </keyBinding> <category --- 251,254 ---- *************** *** 266,270 **** </category> <command - category="org.eclipse.ui.category.project" categoryId="org.rubypeople.rdt.ui.category.project" description="%ActionDefinition.generateRdoc.description" --- 258,261 ---- *************** *** 272,298 **** name="%ActionDefinition.generateRdoc.name"> </command> ! </extension> ! <extension ! point="org.eclipse.ui.actionDefinitions"> ! <actionDefinition description="%ActionDefinition.comment.description" id="org.rubypeople.rdt.ui.edit.text.ruby.comment" name="%ActionDefinition.comment.name"> ! </actionDefinition> ! <actionDefinition description="%ActionDefinition.uncomment.description" id="org.rubypeople.rdt.ui.edit.text.ruby.uncomment" name="%ActionDefinition.uncomment.name"> ! </actionDefinition> ! <actionDefinition description="%ActionDefinition.contentAssist.description" id="org.rubypeople.rdt.ui.edit.text.ruby.content.assist.proposals" name="%ActionDefinition.contentAssist.name"> ! </actionDefinition> ! <actionDefinition description="%ActionDefinition.generateRdoc.description" id="org.rubypeople.rdt.ui.generate.rdoc" name="%ActionDefinition.generateRdoc.name"> ! </actionDefinition> </extension> <extension --- 263,291 ---- name="%ActionDefinition.generateRdoc.name"> </command> ! <command description="%ActionDefinition.comment.description" id="org.rubypeople.rdt.ui.edit.text.ruby.comment" name="%ActionDefinition.comment.name"> ! </command> ! <command ! description="%ActionDefinition.comment.description" ! id="org.rubypeople.rdt.ui.edit.text.ruby.comment" ! name="%ActionDefinition.comment.name"> ! </command> ! <command description="%ActionDefinition.uncomment.description" id="org.rubypeople.rdt.ui.edit.text.ruby.uncomment" name="%ActionDefinition.uncomment.name"> ! </command> ! <command description="%ActionDefinition.contentAssist.description" id="org.rubypeople.rdt.ui.edit.text.ruby.content.assist.proposals" name="%ActionDefinition.contentAssist.name"> ! </command> ! <command description="%ActionDefinition.generateRdoc.description" id="org.rubypeople.rdt.ui.generate.rdoc" name="%ActionDefinition.generateRdoc.name"> ! </command> </extension> <extension |
|
From: David C. <dc...@us...> - 2005-11-20 18:09:42
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29199/src/org/rubypeople/rdt/internal/ui Modified Files: ProjectUpgradeListener.java Log Message: "Hide" warnings by commenting out even more of the stolen Java code. Index: ProjectUpgradeListener.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/ProjectUpgradeListener.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ProjectUpgradeListener.java 16 Oct 2005 21:02:11 -0000 1.2 --- ProjectUpgradeListener.java 20 Nov 2005 18:09:30 -0000 1.3 *************** *** 16,20 **** import org.eclipse.core.resources.IResourceChangeListener; import org.eclipse.core.resources.IResourceDelta; - import org.eclipse.core.runtime.Path; final class ProjectUpgradeListener implements IResourceChangeListener { --- 16,19 ---- |
|
From: David C. <dc...@us...> - 2005-11-20 18:09:40
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/search In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29199/src/org/rubypeople/rdt/internal/ui/search Modified Files: RubySearchPage.java RubySearchQuery.java Log Message: "Hide" warnings by commenting out even more of the stolen Java code. Index: RubySearchQuery.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/search/RubySearchQuery.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RubySearchQuery.java 19 Nov 2005 20:23:21 -0000 1.4 --- RubySearchQuery.java 20 Nov 2005 18:09:30 -0000 1.5 *************** *** 32,41 **** private String fSearchString; ! private SearchScope fScope; private RubySearchResult fResult; private int fSymbolType ; public RubySearchQuery(SearchScope scope, String searchString, int symbolType) { ! fScope = scope; fSearchString = searchString; fSymbolType = symbolType ; --- 32,41 ---- private String fSearchString; ! // private SearchScope fScope; private RubySearchResult fResult; private int fSymbolType ; public RubySearchQuery(SearchScope scope, String searchString, int symbolType) { ! // fScope = scope; fSearchString = searchString; fSymbolType = symbolType ; Index: RubySearchPage.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/search/RubySearchPage.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RubySearchPage.java 13 Nov 2005 13:05:16 -0000 1.4 --- RubySearchPage.java 20 Nov 2005 18:09:30 -0000 1.5 *************** *** 159,176 **** } ! private static final int HISTORY_SIZE = 12; // Dialog store id constants ! private final static String PAGE_NAME = "JavaSearchPage"; //$NON-NLS-1$ ! private final static String STORE_CASE_SENSITIVE = "CASE_SENSITIVE"; //$NON-NLS-1$ ! private final static String STORE_HISTORY = "HISTORY"; //$NON-NLS-1$ ! private final static String STORE_HISTORY_SIZE = "HISTORY_SIZE"; //$NON-NLS-1$ private final List fPreviousSearchPatterns; ! private SearchPatternData fInitialData; private boolean fFirstTime = true; ! private IDialogSettings fDialogSettings; ! private boolean fIsCaseSensitive; private Combo fPattern; --- 159,176 ---- } ! // private static final int HISTORY_SIZE = 12; // Dialog store id constants ! // private final static String PAGE_NAME = "JavaSearchPage"; //$NON-NLS-1$ ! // private final static String STORE_CASE_SENSITIVE = "CASE_SENSITIVE"; //$NON-NLS-1$ ! // private final static String STORE_HISTORY = "HISTORY"; //$NON-NLS-1$ ! // private final static String STORE_HISTORY_SIZE = "HISTORY_SIZE"; //$NON-NLS-1$ private final List fPreviousSearchPatterns; ! // private SearchPatternData fInitialData; private boolean fFirstTime = true; ! // private IDialogSettings fDialogSettings; ! // private boolean fIsCaseSensitive; private Combo fPattern; *************** *** 178,193 **** private Button fCaseSensitive; ! private Button[] fLimitTo; ! private String[] fLimitToText = { "declarations" //$NON-NLS-1$ /* * SearchMessages.SearchPage_limitTo_declarations, * SearchMessages.SearchPage_limitTo_implementors, * SearchMessages.SearchPage_limitTo_references, * SearchMessages.SearchPage_limitTo_allOccurrences ! */}; ! private Button fSearchJRE; ! private static final int INDEX_REFERENCES = 2; ! private static final int INDEX_ALL = 3; private SearchForManager searchForManager = new SearchForManager(); --- 178,194 ---- private Button fCaseSensitive; ! // private Button[] fLimitTo; /* + // private String[] fLimitToText = { "declarations" //$NON-NLS-1$ * SearchMessages.SearchPage_limitTo_declarations, * SearchMessages.SearchPage_limitTo_implementors, * SearchMessages.SearchPage_limitTo_references, * SearchMessages.SearchPage_limitTo_allOccurrences ! }; ! */ ! // private Button fSearchJRE; ! // private static final int INDEX_REFERENCES = 2; ! // private static final int INDEX_ALL = 3; private SearchForManager searchForManager = new SearchForManager(); *************** *** 239,244 **** } - private void setLimitTo(int searchFor, int limitTo) { /* * if (!(searchFor == TYPE || searchFor == INTERFACE) && limitTo == * IMPLEMENTORS) { limitTo= REFERENCES; } --- 240,245 ---- } /* + private void setLimitTo(int searchFor, int limitTo) { * if (!(searchFor == TYPE || searchFor == INTERFACE) && limitTo == * IMPLEMENTORS) { limitTo= REFERENCES; } *************** *** 256,261 **** * fLimitTo[READ_ACCESSES].setEnabled(searchFor == FIELD); * fLimitTo[WRITE_ACCESSES].setEnabled(searchFor == FIELD); - */ } private String[] getPreviousSearchPatterns() { --- 257,262 ---- * fLimitTo[READ_ACCESSES].setEnabled(searchFor == FIELD); * fLimitTo[WRITE_ACCESSES].setEnabled(searchFor == FIELD); } + */ private String[] getPreviousSearchPatterns() { *************** *** 418,422 **** public void widgetSelected(SelectionEvent e) { ! fIsCaseSensitive = fCaseSensitive.getSelection(); } }); --- 419,423 ---- public void widgetSelected(SelectionEvent e) { ! // fIsCaseSensitive = fCaseSensitive.getSelection(); } }); *************** *** 426,436 **** } ! private boolean isValidSearchPattern() { ! if (getPattern().length() == 0) { return false; } ! // TODO ! return true; ! // return SearchPattern.createPattern(getPattern(), getSearchFor(), ! // getLimitTo(), SearchPattern.R_EXACT_MATCH) != null; ! } /* --- 427,437 ---- } ! // private boolean isValidSearchPattern() { ! // if (getPattern().length() == 0) { return false; } ! // // TODO ! // return true; ! // // return SearchPattern.createPattern(getPattern(), getSearchFor(), ! // // getLimitTo(), SearchPattern.R_EXACT_MATCH) != null; ! // } /* |
|
From: David C. <dc...@us...> - 2005-11-20 16:39:57
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2892/src/org/rubypeople/rdt/internal/core/util Modified Files: ShamJobScheduler.java TC_EclipseJobScheduler.java Log Message: Added Unit test for BlockingSymbolFinder Index: TC_EclipseJobScheduler.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/util/TC_EclipseJobScheduler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TC_EclipseJobScheduler.java 13 Nov 2005 15:47:03 -0000 1.1 --- TC_EclipseJobScheduler.java 20 Nov 2005 16:39:49 -0000 1.2 *************** *** 29,32 **** --- 29,39 ---- } + public void testExecute() throws Exception { + TestJob job = new TestJob(); + EclipseJobScheduler scheduler = new EclipseJobScheduler(); + scheduler.execute(job); + job.assertRun(); + } + private static class TestJob extends Job { public TestJob() { Index: ShamJobScheduler.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/util/ShamJobScheduler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ShamJobScheduler.java 13 Nov 2005 15:47:03 -0000 1.1 --- ShamJobScheduler.java 20 Nov 2005 16:39:49 -0000 1.2 *************** *** 29,31 **** --- 29,38 ---- scheduledJobs.add(job); } + + public void execute(Job job) throws InterruptedException { + schedule(job); + job.schedule(); + job.join(); + + } } |
|
From: David C. <dc...@us...> - 2005-11-20 16:39:54
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui.tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2865 Modified Files: plugin.xml .project .classpath Log Message: Added Unit test for BlockingSymbolFinder Index: .project =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui.tests/.project,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** .project 14 Apr 2004 01:01:04 -0000 1.6 --- .project 20 Nov 2005 16:39:46 -0000 1.7 *************** *** 8,11 **** --- 8,12 ---- <project>org.rubypeople.eclipse.testutils</project> <project>org.rubypeople.rdt.core</project> + <project>org.rubypeople.rdt.core.tests</project> <project>org.rubypeople.rdt.ui</project> </projects> Index: plugin.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui.tests/plugin.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** plugin.xml 24 Oct 2005 22:55:12 -0000 1.8 --- plugin.xml 20 Nov 2005 16:39:46 -0000 1.9 *************** *** 29,32 **** --- 29,33 ---- <import plugin="org.eclipse.core.runtime"/> <import plugin="org.eclipse.search"/> + <import plugin="org.rubypeople.rdt.core.tests"/> </requires> Index: .classpath =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui.tests/.classpath,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** .classpath 28 Mar 2004 19:05:46 -0000 1.5 --- .classpath 20 Nov 2005 16:39:46 -0000 1.6 *************** *** 2,7 **** <classpath> <classpathentry kind="src" path="src"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="output" path="bin"/> </classpath> --- 2,7 ---- <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="output" path="bin"/> </classpath> |
|
From: David C. <dc...@us...> - 2005-11-20 16:39:54
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/symbols In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2865/src/org/rubypeople/rdt/internal/ui/symbols Added Files: TC_BlockingSymbolFinder.java TS_UiSymbols.java Log Message: Added Unit test for BlockingSymbolFinder --- NEW FILE: TS_UiSymbols.java --- package org.rubypeople.rdt.internal.ui.symbols; import junit.framework.Test; import junit.framework.TestSuite; public class TS_UiSymbols { public static Test suite() { TestSuite suite = new TestSuite("org.rubypeople.rdt.internal.ui.symbols"); suite.addTestSuite(TC_BlockingSymbolFinder.class); return suite; } } --- NEW FILE: TC_BlockingSymbolFinder.java --- package org.rubypeople.rdt.internal.ui.symbols; import junit.framework.TestCase; import org.eclipse.core.runtime.jobs.Job; import org.rubypeople.rdt.internal.core.builder.ShamSymbolIndex; import org.rubypeople.rdt.internal.core.symbols.Symbol; import org.rubypeople.rdt.internal.core.symbols.SymbolSchedulingRule; import org.rubypeople.rdt.internal.core.util.ShamJobScheduler; import org.rubypeople.rdt.internal.ui.symbols.BlockingSymbolFinder.FindExactSymbolJob; import org.rubypeople.rdt.internal.ui.symbols.BlockingSymbolFinder.FindInexactSymbolJob; public class TC_BlockingSymbolFinder extends TestCase { private BlockingSymbolFinder finder; private ShamJobScheduler scheduler; private ShamSymbolIndex index; public void setUp() { scheduler = new ShamJobScheduler(); index = new ShamSymbolIndex(); finder = new BlockingSymbolFinder(index, scheduler); } public void testFindExact() throws Exception { TestSymbol symbol = new TestSymbol(); finder.find(symbol); FindExactSymbolJob expectedJob = new FindExactSymbolJob(index, symbol); setExpectedJobOptions(expectedJob); scheduler.assertScheduled(expectedJob); } public void testFindInexact() throws Exception { TestSymbol symbol = new TestSymbol(); finder.find("pattern", 17); FindInexactSymbolJob expectedJob = new FindInexactSymbolJob(index, "pattern", 17); setExpectedJobOptions(expectedJob); scheduler.assertScheduled(expectedJob); } private void setExpectedJobOptions(Job expectedJob) { expectedJob.setRule(new SymbolSchedulingRule()); expectedJob.setSystem(false); expectedJob.setUser(true); expectedJob.setPriority(Job.INTERACTIVE); } private static class TestSymbol extends Symbol { public TestSymbol() { super(null, 0); } public boolean equals(Object obj) { return this == obj; } public int hashCode() { return 0; } } } |
|
From: David C. <dc...@us...> - 2005-11-20 16:39:54
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2865/src/org/rubypeople/rdt/internal/ui Modified Files: TS_InternalUi.java Log Message: Added Unit test for BlockingSymbolFinder Index: TS_InternalUi.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/TS_InternalUi.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TS_InternalUi.java 16 Oct 2005 23:52:40 -0000 1.1 --- TS_InternalUi.java 20 Nov 2005 16:39:46 -0000 1.2 *************** *** 4,7 **** --- 4,9 ---- import junit.framework.TestSuite; + import org.rubypeople.rdt.internal.ui.symbols.TS_UiSymbols; + public class TS_InternalUi { *************** *** 12,15 **** --- 14,18 ---- suite.addTestSuite(TC_ResourceAdapterFactory.class); suite.addTestSuite(TC_RubyFileMatcher.class); + suite.addTest(TS_UiSymbols.suite()); return suite; } |
|
From: David C. <dc...@us...> - 2005-11-20 16:39:51
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/symbols In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2802/src/org/rubypeople/rdt/internal/ui/symbols Modified Files: BlockingSymbolFinder.java Log Message: Added Unit test for BlockingSymbolFinder Index: BlockingSymbolFinder.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/symbols/BlockingSymbolFinder.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BlockingSymbolFinder.java 20 Nov 2005 02:23:07 -0000 1.1 --- BlockingSymbolFinder.java 20 Nov 2005 16:39:39 -0000 1.2 *************** *** 12,33 **** import org.rubypeople.rdt.internal.core.symbols.Symbol; import org.rubypeople.rdt.internal.core.symbols.SymbolSchedulingRule; - // DSC UNIT TEST public class BlockingSymbolFinder implements ISymbolFinder { private final ISymbolFinder delegate; ! public BlockingSymbolFinder(ISymbolFinder symbolFinder) { this.delegate = symbolFinder; } public Set find(final Symbol symbol) { FindSymbolJob job = new FindExactSymbolJob(delegate, symbol); ! return job.executeJob(); } public Set find(String regExp, int symbolType) throws PatternSyntaxException { ! FindSymbolJob job = new FindInexactSymbolJob("find " + regExp, delegate, regExp, symbolType); ! return job.executeJob(); } --- 12,35 ---- import org.rubypeople.rdt.internal.core.symbols.Symbol; import org.rubypeople.rdt.internal.core.symbols.SymbolSchedulingRule; + import org.rubypeople.rdt.internal.core.util.IJobScheduler; public class BlockingSymbolFinder implements ISymbolFinder { private final ISymbolFinder delegate; + private final IJobScheduler scheduler; ! public BlockingSymbolFinder(ISymbolFinder symbolFinder, IJobScheduler scheduler) { this.delegate = symbolFinder; + this.scheduler = scheduler; } public Set find(final Symbol symbol) { FindSymbolJob job = new FindExactSymbolJob(delegate, symbol); ! return job.executeJob(scheduler); } public Set find(String regExp, int symbolType) throws PatternSyntaxException { ! FindSymbolJob job = new FindInexactSymbolJob( delegate, regExp, symbolType); ! return job.executeJob(scheduler); } *************** *** 46,59 **** protected abstract Set find() throws PatternSyntaxException; ! private Set executeJob() { ! schedule(); ! try { ! join(); } catch (InterruptedException e) { ! e.printStackTrace(); ! } ! if (exception != null) ! throw exception; return locations; } --- 48,58 ---- protected abstract Set find() throws PatternSyntaxException; ! private Set executeJob(IJobScheduler scheduler) { try { ! scheduler.execute(this); ! if (exception != null) ! throw exception; } catch (InterruptedException e) { ! }; return locations; } *************** *** 67,81 **** return Status.OK_STATUS; } } ! private static class FindInexactSymbolJob extends FindSymbolJob { private final ISymbolFinder delegate; private final String regExp; private final int symbolType; ! private FindInexactSymbolJob(String name, ISymbolFinder delegate, String regExp, int symbolType) { ! super(name); this.delegate = delegate; this.regExp = regExp; --- 66,87 ---- return Status.OK_STATUS; } + + protected boolean propertiesEquals(Job that) { + return getRule().equals(that.getRule()) + && isSystem()== that.isSystem() + && isUser() == that.isUser() + && getPriority() == that.getPriority(); + } } ! public static class FindInexactSymbolJob extends FindSymbolJob { private final ISymbolFinder delegate; private final String regExp; private final int symbolType; ! public FindInexactSymbolJob(ISymbolFinder delegate, String regExp, int symbolType) { ! super("find " + regExp); this.delegate = delegate; this.regExp = regExp; *************** *** 86,98 **** return delegate.find(regExp, symbolType); } } ! private static class FindExactSymbolJob extends FindSymbolJob { private final ISymbolFinder delegate; private final Symbol symbol; ! private FindExactSymbolJob(ISymbolFinder delegate, Symbol symbol) { super("find "+symbol); this.delegate = delegate; --- 92,119 ---- return delegate.find(regExp, symbolType); } + + public boolean equals(Object obj) { + if (!(obj instanceof FindInexactSymbolJob)) + return false; + + FindInexactSymbolJob that = (FindInexactSymbolJob) obj; + return delegate.equals(that.delegate) + && regExp.equals(that.regExp) + && symbolType == that.symbolType + && propertiesEquals(that); + } + + public int hashCode() { + return 0; + } } ! public static class FindExactSymbolJob extends FindSymbolJob { private final ISymbolFinder delegate; private final Symbol symbol; ! public FindExactSymbolJob(ISymbolFinder delegate, Symbol symbol) { super("find "+symbol); this.delegate = delegate; *************** *** 103,113 **** return delegate.find(symbol); } } - - - public Set find() { - // TODO Auto-generated method stub - return null; - } - } --- 124,141 ---- return delegate.find(symbol); } + + public boolean equals(Object obj) { + if (!(obj instanceof FindExactSymbolJob)) + return false; + + FindExactSymbolJob that = (FindExactSymbolJob) obj; + return delegate.equals(that.delegate) + && symbol.equals(that.symbol) + && propertiesEquals(that); + } + + public int hashCode() { + return 0; + } } } |
|
From: David C. <dc...@us...> - 2005-11-20 16:39:50
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/symbols In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2839/src/org/rubypeople/rdt/internal/core/symbols Modified Files: SymbolSchedulingRule.java Log Message: Added Unit test for BlockingSymbolFinder Index: SymbolSchedulingRule.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/symbols/SymbolSchedulingRule.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SymbolSchedulingRule.java 20 Nov 2005 02:23:11 -0000 1.1 --- SymbolSchedulingRule.java 20 Nov 2005 16:39:42 -0000 1.2 *************** *** 13,15 **** --- 13,20 ---- } + public boolean equals(Object obj) { + if (obj == null) + return false; + return obj.getClass().equals(getClass()); + } } |
|
From: David C. <dc...@us...> - 2005-11-20 16:39:50
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2839/src/org/rubypeople/rdt/internal/core/util Modified Files: EclipseJobScheduler.java IJobScheduler.java Log Message: Added Unit test for BlockingSymbolFinder Index: EclipseJobScheduler.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/EclipseJobScheduler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EclipseJobScheduler.java 13 Nov 2005 15:47:08 -0000 1.1 --- EclipseJobScheduler.java 20 Nov 2005 16:39:42 -0000 1.2 *************** *** 19,21 **** --- 19,26 ---- } + public void execute(Job job) throws InterruptedException { + schedule(job); + job.join(); + } + } Index: IJobScheduler.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/IJobScheduler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IJobScheduler.java 13 Nov 2005 15:47:08 -0000 1.1 --- IJobScheduler.java 20 Nov 2005 16:39:42 -0000 1.2 *************** *** 15,18 **** --- 15,19 ---- public interface IJobScheduler { public void schedule(Job job); + public void execute(Job job) throws InterruptedException; } |
|
From: David C. <dc...@us...> - 2005-11-20 16:39:47
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2802/src/org/rubypeople/rdt/internal/ui Modified Files: RubyPlugin.java Log Message: Added Unit test for BlockingSymbolFinder Index: RubyPlugin.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyPlugin.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** RubyPlugin.java 20 Nov 2005 02:23:07 -0000 1.17 --- RubyPlugin.java 20 Nov 2005 16:39:39 -0000 1.18 *************** *** 43,46 **** --- 43,47 ---- import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.core.WorkingCopyOwner; + import org.rubypeople.rdt.internal.core.util.EclipseJobScheduler; import org.rubypeople.rdt.internal.formatter.CodeFormatter; import org.rubypeople.rdt.internal.ui.preferences.MockupPreferenceStore; *************** *** 134,138 **** RubyCore rubyCore = RubyCore.getPlugin(); ! BlockingSymbolFinder symbolFinder = new BlockingSymbolFinder(rubyCore.getSymbolFinder()); rubyCore.setSymbolFinder(symbolFinder); --- 135,139 ---- RubyCore rubyCore = RubyCore.getPlugin(); ! BlockingSymbolFinder symbolFinder = new BlockingSymbolFinder(rubyCore.getSymbolFinder(), new EclipseJobScheduler()); rubyCore.setSymbolFinder(symbolFinder); |
|
From: David C. <dc...@us...> - 2005-11-20 16:39:44
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/symbols In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2773/src/org/rubypeople/rdt/internal/ui/symbols Log Message: Directory /cvsroot/rubyeclipse/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/symbols added to the repository |
|
From: David C. <dc...@us...> - 2005-11-20 13:16:01
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/views In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21782/src/org/rubypeople/rdt/testunit/views Modified Files: OpenSymbolAction.java Log Message: Flush a project symbols from the SymbolIndex when closed or deleted. Index: OpenSymbolAction.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/views/OpenSymbolAction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OpenSymbolAction.java 20 Nov 2005 02:23:18 -0000 1.3 --- OpenSymbolAction.java 20 Nov 2005 13:15:53 -0000 1.4 *************** *** 20,25 **** import org.rubypeople.rdt.internal.ui.util.PositionBasedEditorOpener; - // DSC don't try to open resources in closed projects - // DSC be sure close a project flushes symbolIndex public class OpenSymbolAction extends Action implements IAction { --- 20,23 ---- |
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21767/src/org/rubypeople/rdt/internal/core Modified Files: ShamMassIndexUpdater.java TC_SymbolIndexResourceEventListener.java ShamResourceChangeEvent.java Log Message: Flush a project symbols from the SymbolIndex when closed or deleted. Index: ShamResourceChangeEvent.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/ShamResourceChangeEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ShamResourceChangeEvent.java 19 Oct 2005 00:33:05 -0000 1.1 --- ShamResourceChangeEvent.java 20 Nov 2005 13:15:48 -0000 1.2 *************** *** 15,27 **** --- 15,43 ---- import org.eclipse.core.resources.IResourceChangeEvent; import org.eclipse.core.resources.IResourceDelta; + import org.rubypeople.eclipse.shams.resources.ShamProject; public class ShamResourceChangeEvent implements IResourceChangeEvent { + public static ShamResourceChangeEvent forClose(ShamProject project) { + return new ShamResourceChangeEvent(PRE_CLOSE, project); + } + + public static ShamResourceChangeEvent forDelete(ShamProject project) { + return new ShamResourceChangeEvent(PRE_DELETE, project); + } private final int type; private final IResourceDelta delta; + private final IResource resource; public ShamResourceChangeEvent(int type, IResourceDelta delta) { this.type = type; this.delta = delta; + this.resource = null; + } + + public ShamResourceChangeEvent(int type, IResource resource) { + this.type = type; + this.resource = resource; + this.delta = null; } *************** *** 39,43 **** public IResource getResource() { ! return null; } --- 55,59 ---- public IResource getResource() { ! return resource; } *************** *** 51,53 **** --- 67,71 ---- + + } Index: TC_SymbolIndexResourceEventListener.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/TC_SymbolIndexResourceEventListener.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TC_SymbolIndexResourceEventListener.java 13 Nov 2005 15:47:03 -0000 1.5 --- TC_SymbolIndexResourceEventListener.java 20 Nov 2005 13:15:48 -0000 1.6 *************** *** 23,26 **** --- 23,27 ---- import org.rubypeople.eclipse.shams.resources.ShamResource; import org.rubypeople.rdt.internal.core.builder.MassIndexUpdaterJob; + import org.rubypeople.rdt.internal.core.builder.ShamSymbolIndex; import org.rubypeople.rdt.internal.core.util.ListUtil; import org.rubypeople.rdt.internal.core.util.ShamJobScheduler; *************** *** 33,41 **** private ShamResource resource; private ShamJobScheduler jobScheduler; public void setUp() { jobScheduler = new ShamJobScheduler(); massIndexUpdater = new ShamMassIndexUpdater(); ! listener = new SymbolIndexResourceChangeListener(massIndexUpdater, jobScheduler); project = new ShamProject("test1"); resource = new ShamResource(new Path("test1/file1")); --- 34,45 ---- private ShamResource resource; private ShamJobScheduler jobScheduler; + private ShamSymbolIndex symbolIndex; public void setUp() { jobScheduler = new ShamJobScheduler(); massIndexUpdater = new ShamMassIndexUpdater(); ! symbolIndex = new ShamSymbolIndex(); ! listener = new SymbolIndexResourceChangeListener(massIndexUpdater, ! symbolIndex, jobScheduler); project = new ShamProject("test1"); resource = new ShamResource(new Path("test1/file1")); *************** *** 90,93 **** --- 94,115 ---- massIndexUpdater.assertUpdateProjectsNotCalled(); } + + public void testClose() { + ShamResourceChangeEvent event = + ShamResourceChangeEvent.forClose(project); + + listener.resourceChanged(event); + + symbolIndex.assertFlushed(project); + } + + public void testDeleteProject() { + ShamResourceChangeEvent event = + ShamResourceChangeEvent.forDelete(project); + + listener.resourceChanged(event); + + symbolIndex.assertFlushed(project); + } public void testNotADeltaChange() throws Exception { Index: ShamMassIndexUpdater.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/ShamMassIndexUpdater.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ShamMassIndexUpdater.java 20 Nov 2005 02:23:14 -0000 1.3 --- ShamMassIndexUpdater.java 20 Nov 2005 13:15:48 -0000 1.4 *************** *** 17,21 **** --- 17,24 ---- import junit.framework.Assert; + import org.eclipse.core.resources.IProject; + import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IProgressMonitor; + import org.rubypeople.eclipse.shams.resources.ShamProject; import org.rubypeople.rdt.internal.core.builder.MassIndexUpdater; *************** *** 24,27 **** --- 27,31 ---- private Collection projectsArg; private IProgressMonitor monitorArg; + private IResource projectArg; public ShamMassIndexUpdater() { *************** *** 39,42 **** --- 43,50 ---- } + public void flush(IProject project) { + projectArg = project; + } + public void assertUpdateProjectsNotCalled() { Assert.assertNull("Unexpected call to updateProjects", projectsArg); *************** *** 46,49 **** --- 54,62 ---- return this == obj; } + + public void assertFlushed(ShamProject project) { + Assert.assertEquals("Flushed project", project, projectArg); + } + |
|
From: David C. <dc...@us...> - 2005-11-20 13:15:53
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21742/src/org/rubypeople/rdt/internal/core/builder Modified Files: MassIndexUpdater.java IndexUpdater.java IoUtils.java Log Message: Flush a project symbols from the SymbolIndex when closed or deleted. Index: IndexUpdater.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/IndexUpdater.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** IndexUpdater.java 13 Nov 2005 13:05:12 -0000 1.9 --- IndexUpdater.java 20 Nov 2005 13:15:45 -0000 1.10 *************** *** 109,112 **** return name + path.getName(); } - } --- 109,111 ---- Index: IoUtils.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/IoUtils.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IoUtils.java 16 Oct 2005 17:29:21 -0000 1.3 --- IoUtils.java 20 Nov 2005 13:15:45 -0000 1.4 *************** *** 30,34 **** public static void closeQuietly(InputStream contents) { try { ! contents.close(); } catch (IOException e) { RubyCore.log(e); --- 30,35 ---- public static void closeQuietly(InputStream contents) { try { ! if (contents != null) ! contents.close(); } catch (IOException e) { RubyCore.log(e); Index: MassIndexUpdater.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/MassIndexUpdater.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MassIndexUpdater.java 20 Nov 2005 02:23:11 -0000 1.6 --- MassIndexUpdater.java 20 Nov 2005 13:15:45 -0000 1.7 *************** *** 90,92 **** --- 90,93 ---- return 0; } + } |
|
From: David C. <dc...@us...> - 2005-11-20 13:15:53
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21742/src/org/rubypeople/rdt/internal/core Modified Files: SymbolIndexResourceChangeListener.java Log Message: Flush a project symbols from the SymbolIndex when closed or deleted. Index: SymbolIndexResourceChangeListener.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/SymbolIndexResourceChangeListener.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SymbolIndexResourceChangeListener.java 13 Nov 2005 15:47:08 -0000 1.3 --- SymbolIndexResourceChangeListener.java 20 Nov 2005 13:15:45 -0000 1.4 *************** *** 30,33 **** --- 30,34 ---- public final class SymbolIndexResourceChangeListener implements IResourceChangeListener { private final MassIndexUpdater updater; + private final SymbolIndex symbolIndex; private final IJobScheduler scheduler; *************** *** 36,45 **** MassIndexUpdater massIndexUpdater = new MassIndexUpdater(indexUpdater); SymbolIndexResourceChangeListener listener ! = new SymbolIndexResourceChangeListener(massIndexUpdater, new EclipseJobScheduler()); ResourcesPlugin.getWorkspace().addResourceChangeListener(listener); } ! public SymbolIndexResourceChangeListener(MassIndexUpdater updater, IJobScheduler scheduler) { this.updater = updater; this.scheduler = scheduler; } --- 37,47 ---- MassIndexUpdater massIndexUpdater = new MassIndexUpdater(indexUpdater); SymbolIndexResourceChangeListener listener ! = new SymbolIndexResourceChangeListener(massIndexUpdater, symbolIndex, new EclipseJobScheduler()); ResourcesPlugin.getWorkspace().addResourceChangeListener(listener); } ! public SymbolIndexResourceChangeListener(MassIndexUpdater updater, SymbolIndex symbolIndex, IJobScheduler scheduler) { this.updater = updater; + this.symbolIndex = symbolIndex; this.scheduler = scheduler; } *************** *** 48,51 **** --- 50,56 ---- if (event.getType() == IResourceChangeEvent.POST_CHANGE) handlePostChangeEvent(event); + else if ( event.getType() == IResourceChangeEvent.PRE_CLOSE + || event.getType() == IResourceChangeEvent.PRE_DELETE) + symbolIndex.flush((IProject) event.getResource()); } |
|
From: David C. <dc...@us...> - 2005-11-20 02:23:29
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/views In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4914/src/org/rubypeople/rdt/testunit/views Modified Files: OpenSymbolAction.java Log Message: Changed job management for index building. Changed finds to be job-based. Index: OpenSymbolAction.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/views/OpenSymbolAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OpenSymbolAction.java 19 Nov 2005 20:23:30 -0000 1.2 --- OpenSymbolAction.java 20 Nov 2005 02:23:18 -0000 1.3 *************** *** 20,24 **** import org.rubypeople.rdt.internal.ui.util.PositionBasedEditorOpener; ! public class OpenSymbolAction extends Action implements IAction { --- 20,25 ---- import org.rubypeople.rdt.internal.ui.util.PositionBasedEditorOpener; ! // DSC don't try to open resources in closed projects ! // DSC be sure close a project flushes symbolIndex public class OpenSymbolAction extends Action implements IAction { |
|
From: David C. <dc...@us...> - 2005-11-20 02:23:27
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4895/src/org/rubypeople/rdt/internal/core/builder Modified Files: TC_MassIndexUpdater.java TC_MassIndexUpdaterJob.java Log Message: Changed job management for index building. Changed finds to be job-based. Index: TC_MassIndexUpdater.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/builder/TC_MassIndexUpdater.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TC_MassIndexUpdater.java 13 Nov 2005 13:05:07 -0000 1.4 --- TC_MassIndexUpdater.java 20 Nov 2005 02:23:14 -0000 1.5 *************** *** 18,22 **** --- 18,24 ---- import org.rubypeople.eclipse.shams.resources.ShamFile; import org.rubypeople.eclipse.shams.resources.ShamProject; + import org.rubypeople.eclipse.shams.runtime.ShamMonitor; import org.rubypeople.rdt.internal.core.parser.ShamNode; + import org.rubypeople.rdt.internal.core.util.ListUtil; public class TC_MassIndexUpdater extends TestCase { *************** *** 49,53 **** projects.add(project2); ! massUpdater.updateProjects(projects); RubySourceFileCollectingVisitor expectedVisitor = new RubySourceFileCollectingVisitor(new ArrayList()); --- 51,56 ---- projects.add(project2); ! ShamMonitor monitor = new ShamMonitor(); ! massUpdater.updateProjects(projects, monitor); RubySourceFileCollectingVisitor expectedVisitor = new RubySourceFileCollectingVisitor(new ArrayList()); *************** *** 60,63 **** --- 63,70 ---- updater.assertUpdated(file2, rootNode2, false); updater.assertUpdated(file3, rootNode3, false); + + monitor.assertTaskBegun("Update symbol index", 3); + monitor.assertSubTasks(ListUtil.create( + "file1.rb", "file2.rb", "file3.rb")); } } Index: TC_MassIndexUpdaterJob.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/builder/TC_MassIndexUpdaterJob.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TC_MassIndexUpdaterJob.java 13 Nov 2005 15:47:03 -0000 1.1 --- TC_MassIndexUpdaterJob.java 20 Nov 2005 02:23:14 -0000 1.2 *************** *** 12,15 **** --- 12,16 ---- import org.rubypeople.eclipse.shams.resources.ShamProject; + import org.rubypeople.eclipse.shams.runtime.ShamMonitor; import org.rubypeople.rdt.internal.core.ShamMassIndexUpdater; import org.rubypeople.rdt.internal.core.util.ListUtil; *************** *** 22,25 **** --- 23,27 ---- ShamProject project = new ShamProject("test1"); MassIndexUpdaterJob job = new MassIndexUpdaterJob(massIndexUpdater, ListUtil.create(project)); + ShamMonitor monitor = new ShamMonitor(); job.schedule(); job.join(); |
|
From: David C. <dc...@us...> - 2005-11-20 02:23:27
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4895/src/org/rubypeople/rdt/internal/core Modified Files: ShamMassIndexUpdater.java Log Message: Changed job management for index building. Changed finds to be job-based. Index: ShamMassIndexUpdater.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/ShamMassIndexUpdater.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ShamMassIndexUpdater.java 13 Nov 2005 15:47:03 -0000 1.2 --- ShamMassIndexUpdater.java 20 Nov 2005 02:23:14 -0000 1.3 *************** *** 17,20 **** --- 17,21 ---- import junit.framework.Assert; + import org.eclipse.core.runtime.IProgressMonitor; import org.rubypeople.rdt.internal.core.builder.MassIndexUpdater; *************** *** 22,25 **** --- 23,27 ---- private Collection projectsArg; + private IProgressMonitor monitorArg; public ShamMassIndexUpdater() { *************** *** 28,36 **** public void assertProjectsUpdated(Collection expectedProjects) { ! Assert.assertEquals(expectedProjects, projectsArg); } ! public void updateProjects(List projects) { projectsArg = projects; } --- 30,40 ---- public void assertProjectsUpdated(Collection expectedProjects) { ! Assert.assertEquals("Projects", expectedProjects, projectsArg); ! Assert.assertNotNull("Monitor", monitorArg); } ! public void updateProjects(List projects, IProgressMonitor monitor) { projectsArg = projects; + monitorArg = monitor; } |
|
From: David C. <dc...@us...> - 2005-11-20 02:23:25
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4864/src/org/rubypeople/rdt/core Modified Files: RubyCore.java Log Message: Changed job management for index building. Changed finds to be job-based. Index: RubyCore.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** RubyCore.java 19 Nov 2005 20:23:25 -0000 1.26 --- RubyCore.java 20 Nov 2005 02:23:11 -0000 1.27 *************** *** 152,160 **** private SymbolIndex symbolIndex; public RubyCore() { super(); RUBY_CORE_PLUGIN = this; ! symbolIndex = new SymbolIndex(); } --- 152,161 ---- private SymbolIndex symbolIndex; + private ISymbolFinder symbolFinder; public RubyCore() { super(); RUBY_CORE_PLUGIN = this; ! symbolFinder = symbolIndex = new SymbolIndex(); } *************** *** 479,483 **** public ISymbolFinder getSymbolFinder() { ! return symbolIndex; } } \ No newline at end of file --- 480,488 ---- public ISymbolFinder getSymbolFinder() { ! return symbolFinder; ! } ! ! public void setSymbolFinder(ISymbolFinder symbolFinder) { ! this.symbolFinder = symbolFinder; } } \ No newline at end of file |
|
From: David C. <dc...@us...> - 2005-11-20 02:23:25
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4864/src/org/rubypeople/rdt/internal/core/builder Modified Files: MassIndexUpdaterJob.java MassIndexUpdater.java Log Message: Changed job management for index building. Changed finds to be job-based. Index: MassIndexUpdaterJob.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/MassIndexUpdaterJob.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MassIndexUpdaterJob.java 13 Nov 2005 15:47:08 -0000 1.1 --- MassIndexUpdaterJob.java 20 Nov 2005 02:23:11 -0000 1.2 *************** *** 17,20 **** --- 17,21 ---- import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; + import org.rubypeople.rdt.internal.core.symbols.SymbolSchedulingRule; public class MassIndexUpdaterJob extends Job { *************** *** 28,38 **** public MassIndexUpdaterJob(MassIndexUpdater massIndexUpdater, List rubyProjects) { ! super("Mass Index Update"); this.massIndexUpdater = massIndexUpdater; this.rubyProjects = rubyProjects; } protected IStatus run(IProgressMonitor monitor) { ! massIndexUpdater.updateProjects(rubyProjects); return Status.OK_STATUS; } --- 29,43 ---- public MassIndexUpdaterJob(MassIndexUpdater massIndexUpdater, List rubyProjects) { ! super("Update Ruby Symbol Index"); this.massIndexUpdater = massIndexUpdater; this.rubyProjects = rubyProjects; + setRule(new SymbolSchedulingRule()); + setSystem(true); + setPriority(Job.LONG); } + protected IStatus run(IProgressMonitor monitor) { ! massIndexUpdater.updateProjects(rubyProjects, monitor); return Status.OK_STATUS; } Index: MassIndexUpdater.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/MassIndexUpdater.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MassIndexUpdater.java 13 Nov 2005 15:47:08 -0000 1.5 --- MassIndexUpdater.java 20 Nov 2005 02:23:11 -0000 1.6 *************** *** 18,21 **** --- 18,22 ---- import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; + import org.eclipse.core.runtime.IProgressMonitor; import org.jruby.ast.Node; import org.rubypeople.rdt.core.RubyCore; *************** *** 36,43 **** } ! public void updateProjects(List projects) { try { List files = findFiles(projects); ! processFiles(files); } catch (CoreException e) { RubyCore.log(e); --- 37,45 ---- } ! public void updateProjects(List projects, IProgressMonitor monitor) { try { List files = findFiles(projects); ! monitor.beginTask("Update symbol index", files.size()); ! processFiles(files, monitor); } catch (CoreException e) { RubyCore.log(e); *************** *** 45,51 **** } ! private void processFiles(List files) { for (Iterator iter = files.iterator(); iter.hasNext();) { IFile file = (IFile) iter.next(); processFile(file); } --- 47,55 ---- } ! private void processFiles(List files, IProgressMonitor monitor) { for (Iterator iter = files.iterator(); iter.hasNext();) { IFile file = (IFile) iter.next(); + monitor.subTask(file.getFullPath().toString()); + monitor.worked(1); processFile(file); } |
|
From: David C. <dc...@us...> - 2005-11-20 02:23:23
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/symbols In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4864/src/org/rubypeople/rdt/internal/core/symbols Added Files: SymbolSchedulingRule.java Log Message: Changed job management for index building. Changed finds to be job-based. --- NEW FILE: SymbolSchedulingRule.java --- package org.rubypeople.rdt.internal.core.symbols; import org.eclipse.core.runtime.jobs.ISchedulingRule; public class SymbolSchedulingRule implements ISchedulingRule { public boolean contains(ISchedulingRule rule) { return isConflicting(rule); } public boolean isConflicting(ISchedulingRule rule) { return rule instanceof SymbolSchedulingRule; } } |
|
From: David C. <dc...@us...> - 2005-11-20 02:23:17
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4841/src/org/rubypeople/rdt/internal/ui Modified Files: RubyPlugin.java Log Message: Changed job management for index building. Changed finds to be job-based. Index: RubyPlugin.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyPlugin.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** RubyPlugin.java 16 Oct 2005 19:03:37 -0000 1.16 --- RubyPlugin.java 20 Nov 2005 02:23:07 -0000 1.17 *************** *** 50,53 **** --- 50,54 ---- import org.rubypeople.rdt.internal.ui.rubyeditor.WorkingCopyManager; import org.rubypeople.rdt.internal.ui.rubyeditor.templates.RubyTemplateAccess; + import org.rubypeople.rdt.internal.ui.symbols.BlockingSymbolFinder; import org.rubypeople.rdt.internal.ui.text.IRubyColorConstants; import org.rubypeople.rdt.internal.ui.text.PreferencesAdapter; *************** *** 130,133 **** --- 131,139 ---- } }); + + + RubyCore rubyCore = RubyCore.getPlugin(); + BlockingSymbolFinder symbolFinder = new BlockingSymbolFinder(rubyCore.getSymbolFinder()); + rubyCore.setSymbolFinder(symbolFinder); listenForNewProjects(); |
|
From: David C. <dc...@us...> - 2005-11-20 02:23:17
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/symbols In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4841/src/org/rubypeople/rdt/internal/ui/symbols Added Files: BlockingSymbolFinder.java Log Message: Changed job management for index building. Changed finds to be job-based. --- NEW FILE: BlockingSymbolFinder.java --- package org.rubypeople.rdt.internal.ui.symbols; import java.util.HashSet; import java.util.Set; import java.util.regex.PatternSyntaxException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.rubypeople.rdt.internal.core.symbols.ISymbolFinder; import org.rubypeople.rdt.internal.core.symbols.Symbol; import org.rubypeople.rdt.internal.core.symbols.SymbolSchedulingRule; // DSC UNIT TEST public class BlockingSymbolFinder implements ISymbolFinder { private final ISymbolFinder delegate; public BlockingSymbolFinder(ISymbolFinder symbolFinder) { this.delegate = symbolFinder; } public Set find(final Symbol symbol) { FindSymbolJob job = new FindExactSymbolJob(delegate, symbol); return job.executeJob(); } public Set find(String regExp, int symbolType) throws PatternSyntaxException { FindSymbolJob job = new FindInexactSymbolJob("find " + regExp, delegate, regExp, symbolType); return job.executeJob(); } private static abstract class FindSymbolJob extends Job { protected Set locations = new HashSet(); private PatternSyntaxException exception; public FindSymbolJob(String name) { super(name); setPriority(Job.INTERACTIVE); setUser(true); setRule(new SymbolSchedulingRule()); } protected abstract Set find() throws PatternSyntaxException; private Set executeJob() { schedule(); try { join(); } catch (InterruptedException e) { e.printStackTrace(); } if (exception != null) throw exception; return locations; } protected IStatus run(IProgressMonitor monitor) { try { locations = find(); } catch (PatternSyntaxException e) { exception = e; } return Status.OK_STATUS; } } private static class FindInexactSymbolJob extends FindSymbolJob { private final ISymbolFinder delegate; private final String regExp; private final int symbolType; private FindInexactSymbolJob(String name, ISymbolFinder delegate, String regExp, int symbolType) { super(name); this.delegate = delegate; this.regExp = regExp; this.symbolType = symbolType; } protected Set find() { return delegate.find(regExp, symbolType); } } private static class FindExactSymbolJob extends FindSymbolJob { private final ISymbolFinder delegate; private final Symbol symbol; private FindExactSymbolJob(ISymbolFinder delegate, Symbol symbol) { super("find "+symbol); this.delegate = delegate; this.symbol = symbol; } protected Set find() { return delegate.find(symbol); } } public Set find() { // TODO Auto-generated method stub return null; } } |