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: Christopher W. <caw...@us...> - 2005-04-01 01:59:32
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16048/src/org/rubypeople/rdt/internal/ui/preferences Modified Files: TextEditorPreferencePage2.java Log Message: highlight and partition regular expressions separately from code. Handle more ways of defining strings and regexps (like %r, %q, %Q, etc) for syntax highlighting Index: TextEditorPreferencePage2.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/TextEditorPreferencePage2.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** TextEditorPreferencePage2.java 5 Mar 2005 16:02:19 -0000 1.13 --- TextEditorPreferencePage2.java 1 Apr 2005 01:59:20 -0000 1.14 *************** *** 44,49 **** import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants; - import org.rubypeople.rdt.internal.ui.RubyUIMessages; import org.rubypeople.rdt.internal.ui.RubyPlugin; import org.rubypeople.rdt.internal.ui.text.IRubyColorConstants; import org.rubypeople.rdt.ui.PreferenceConstants; --- 44,49 ---- import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants; import org.rubypeople.rdt.internal.ui.RubyPlugin; + import org.rubypeople.rdt.internal.ui.RubyUIMessages; import org.rubypeople.rdt.internal.ui.text.IRubyColorConstants; import org.rubypeople.rdt.ui.PreferenceConstants; *************** *** 69,73 **** protected TextPropertyWidget[] textPropertyWidgets; protected Text indentationWidget; ! protected final String[] colorProperties = { IRubyColorConstants.RUBY_KEYWORD, IRubyColorConstants.RUBY_MULTI_LINE_COMMENT, IRubyColorConstants.RUBY_SINGLE_LINE_COMMENT, IRubyColorConstants.RUBY_STRING, IRubyColorConstants.TASK_TAG,IRubyColorConstants.RUBY_DEFAULT}; //private final String[][] fAnnotationColorListModel; --- 69,73 ---- protected TextPropertyWidget[] textPropertyWidgets; protected Text indentationWidget; ! protected final String[] colorProperties = { IRubyColorConstants.RUBY_KEYWORD, IRubyColorConstants.RUBY_MULTI_LINE_COMMENT, IRubyColorConstants.RUBY_SINGLE_LINE_COMMENT, IRubyColorConstants.RUBY_STRING, IRubyColorConstants.TASK_TAG, IRubyColorConstants.RUBY_REGEXP, IRubyColorConstants.RUBY_DEFAULT}; //private final String[][] fAnnotationColorListModel; |
|
From: Christopher W. <caw...@us...> - 2005-04-01 01:59:32
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16048/src/org/rubypeople/rdt/internal/ui Modified Files: RubyUIMessages.properties RubyPlugin.java Log Message: highlight and partition regular expressions separately from code. Handle more ways of defining strings and regexps (like %r, %q, %Q, etc) for syntax highlighting Index: RubyPlugin.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyPlugin.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RubyPlugin.java 12 Mar 2005 15:32:31 -0000 1.7 --- RubyPlugin.java 1 Apr 2005 01:59:20 -0000 1.8 *************** *** 202,205 **** --- 202,208 ---- store.setDefault(RUBY_STRING + PreferenceConstants.EDITOR_BOLD_SUFFIX, false); store.setDefault(RUBY_STRING + PreferenceConstants.EDITOR_ITALIC_SUFFIX, false); + PreferenceConverter.setDefault(store, RUBY_REGEXP, new RGB(90, 30, 160)); + store.setDefault(RUBY_REGEXP + PreferenceConstants.EDITOR_BOLD_SUFFIX, false); + store.setDefault(RUBY_REGEXP + PreferenceConstants.EDITOR_ITALIC_SUFFIX, false); PreferenceConverter.setDefault(store, RUBY_MULTI_LINE_COMMENT, new RGB(63, 127, 95)); store.setDefault(RUBY_MULTI_LINE_COMMENT + PreferenceConstants.EDITOR_BOLD_SUFFIX, false); Index: RubyUIMessages.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyUIMessages.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RubyUIMessages.properties 12 Mar 2005 16:52:13 -0000 1.3 --- RubyUIMessages.properties 1 Apr 2005 01:59:20 -0000 1.4 *************** *** 58,61 **** --- 58,62 ---- RubyEditorPropertyPage.color_ruby_singleline_comment=Single-line comments RubyEditorPropertyPage.color_ruby_task=Task Tags + RubyEditorPropertyPage.color_ruby_regexp=Regular Expressions RubyEditorPropertyPage.indentation=Characters per indentation level: RubyEditorPropertyPage.useTab=Use tab (if disabled, typed tabs are also converted to spaces) |
|
From: Christopher W. <caw...@us...> - 2005-03-30 01:58:40
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17366/lib Modified Files: jruby.jar Log Message: fix problem with useless statement visitor (tagging warnings on classes when it shouldn't) Index: jruby.jar =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/lib/jruby.jar,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsSjnw7S and /tmp/cvsgxq1qk differ |
|
From: Christopher W. <caw...@us...> - 2005-03-30 01:57:33
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16771/src/org/rubypeople/rdt/core Modified Files: RubyCore.java Log Message: check for null messages from exception for log Index: RubyCore.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RubyCore.java 12 Mar 2005 15:30:03 -0000 1.7 --- RubyCore.java 30 Mar 2005 01:57:05 -0000 1.8 *************** *** 223,227 **** public static void log(Exception e) { ! log(Status.ERROR, e.getMessage(), e); } --- 223,229 ---- public static void log(Exception e) { ! String msg = e.getMessage(); ! if (msg == null) msg = ""; ! log(Status.ERROR, msg, e); } |
|
From: Christopher W. <caw...@us...> - 2005-03-30 01:56:41
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16630/src/org/rubypeople/rdt/internal/core/builder Modified Files: RubyBuilder.java Log Message: clear the task parser accumulated tags before we parse another file (otherwise we'll just keep them all and set them on succeeding files) Index: RubyBuilder.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/RubyBuilder.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RubyBuilder.java 30 Mar 2005 00:12:29 -0000 1.7 --- RubyBuilder.java 30 Mar 2005 01:56:29 -0000 1.8 *************** *** 94,97 **** --- 94,98 ---- percentPerUnit = 0; warnings.clear(); + taskParser.clear(); } *************** *** 187,191 **** if (this.compiledAllAtOnce) { // do them all now ! doCompile(units, null); } else { int i = 0; --- 188,192 ---- if (this.compiledAllAtOnce) { // do them all now ! doCompile(units, monitor); } else { int i = 0; *************** *** 234,238 **** monitor.subTask(name + ": (" + i + " of " + grandTotal + ")"); ! MarkerUtility.removeMarkers(file); try { parser.parse(units[i].getName(), new InputStreamReader(file.getContents())); --- 235,239 ---- monitor.subTask(name + ": (" + i + " of " + grandTotal + ")"); ! removeProblemsAndTasksFor(file); try { parser.parse(units[i].getName(), new InputStreamReader(file.getContents())); *************** *** 241,245 **** } MarkerUtility.createProblemMarkers(file, warnings.getWarnings()); - warnings.clear(); createTasks(file); monitor.worked(percentPerUnit); --- 242,245 ---- *************** *** 247,250 **** --- 247,251 ---- RubyCore.log(e); } + warnings.clear(); } checkCancel(monitor); *************** *** 252,257 **** --- 253,260 ---- private void createTasks(IFile file) throws CoreException { + taskParser.clear(); taskParser.parse(new InputStreamReader(file.getContents())); MarkerUtility.createTasks(file, taskParser.getTasks()); + taskParser.clear(); } } |
|
From: Christopher W. <caw...@us...> - 2005-03-30 01:56:41
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16630/src/org/rubypeople/rdt/internal/core/parser Modified Files: TaskParser.java Log Message: clear the task parser accumulated tags before we parse another file (otherwise we'll just keep them all and set them on succeeding files) Index: TaskParser.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/TaskParser.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TaskParser.java 17 Mar 2005 01:13:19 -0000 1.5 --- TaskParser.java 30 Mar 2005 01:56:29 -0000 1.6 *************** *** 148,150 **** --- 148,154 ---- return Collections.unmodifiableList(tasks); } + + public void clear() { + tasks.clear(); + } } |
|
From: Christopher W. <caw...@us...> - 2005-03-30 01:55:46
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15773/src/org/rubypeople/rdt/internal/ui/rubyeditor Modified Files: RubyAbstractEditor.java Log Message: fix for when users select import statements in outline view Index: RubyAbstractEditor.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyAbstractEditor.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** RubyAbstractEditor.java 12 Mar 2005 16:52:13 -0000 1.20 --- RubyAbstractEditor.java 30 Mar 2005 01:55:33 -0000 1.21 *************** *** 148,167 **** } // FIXME Uncomment so we bring editor to top ! if (!isActivePart() && RubyPlugin.getActivePage() != null) ! RubyPlugin.getActivePage().bringToTop(this); // setSelection(reference, !isActivePart()); setSelection(reference, true); } ! protected boolean isActivePart() { ! IWorkbenchPart part= getActivePart(); return part != null && part.equals(this); } ! private IWorkbenchPart getActivePart() { ! IWorkbenchWindow window= getSite().getWorkbenchWindow(); ! IPartService service= window.getPartService(); ! IWorkbenchPart part= service.getActivePart(); return part; } --- 148,166 ---- } // FIXME Uncomment so we bring editor to top ! if (!isActivePart() && RubyPlugin.getActivePage() != null) RubyPlugin.getActivePage().bringToTop(this); // setSelection(reference, !isActivePart()); setSelection(reference, true); } ! protected boolean isActivePart() { ! IWorkbenchPart part = getActivePart(); return part != null && part.equals(this); } ! private IWorkbenchPart getActivePart() { ! IWorkbenchWindow window = getSite().getWorkbenchWindow(); ! IPartService service = window.getPartService(); ! IWorkbenchPart part = service.getActivePart(); return part; } *************** *** 193,218 **** try { ISourceRange range = null; ! // if (reference instanceof ILocalVariable) { ! // IJavaElement je= ((ILocalVariable)reference).getParent(); ! // if (je instanceof ISourceReference) ! // range= ((ISourceReference)je).getSourceRange(); ! // } else ! // range= reference.getSourceRange(); ! // ! // if (range == null) ! // return; ! // ! // int offset= range.getOffset(); ! // int length= range.getLength(); ! // ! // if (offset < 0 || length < 0) ! // return; ! // ! // setHighlightRange(offset, length, moveCursor); ! if (!moveCursor) return; ! int offset = -1; ! int length = -1; if (reference instanceof IMember) { --- 192,215 ---- try { ISourceRange range = null; ! // if (reference instanceof ILocalVariable) { ! // IRubyElement je = ((ILocalVariable) reference).getParent(); ! // if (je instanceof ISourceReference) range = ((ISourceReference) je).getSourceRange(); ! // } else ! range = reference.getSourceRange(); ! if (range == null) return; ! int offset = range.getOffset(); ! int length = range.getLength(); ! ! if (offset < 0 || length < 0) return; ! ! setHighlightRange(offset, length, moveCursor); ! ! if (!moveCursor) ! return; ! ! offset= -1; ! length= -1; if (reference instanceof IMember) { |
|
From: Christopher W. <caw...@us...> - 2005-03-30 00:56:48
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16590/lib Modified Files: jruby.jar Log Message: update to latest jruby code in jar (and hopefully I removed all my debug output) Index: jruby.jar =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/lib/jruby.jar,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvs6KELZa and /tmp/cvsbChcYl differ |
|
From: Christopher W. <caw...@us...> - 2005-03-30 00:12:42
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25424/src/org/rubypeople/rdt/internal/core/builder Modified Files: RubyBuilder.java Added Files: WorkQueue.java Log Message: update builder to allow cancelling. Attempt to speed the builder up by not recreating a parser and warnings object for every file. --- NEW FILE: WorkQueue.java --- /** * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.rubypeople.rdt.internal.core.builder; import java.util.ArrayList; import org.eclipse.core.resources.IFile; public class WorkQueue { ArrayList needsCompileList; ArrayList compiledList; public WorkQueue() { this.needsCompileList = new ArrayList(11); this.compiledList = new ArrayList(11); } public void add(IFile element) { needsCompileList.add(element); } public void addAll(IFile[] elements) { for (int i = 0, l = elements.length; i < l; i++) add(elements[i]); } public void clear() { this.needsCompileList.clear(); this.compiledList.clear(); } public void finished(IFile element) { needsCompileList.remove(element); compiledList.add(element); } public boolean isCompiled(IFile element) { return compiledList.contains(element); } public boolean isWaiting(IFile element) { return needsCompileList.contains(element); } public String toString() { return "WorkQueue: " + needsCompileList; //$NON-NLS-1$ } } Index: RubyBuilder.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/RubyBuilder.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RubyBuilder.java 17 Mar 2005 01:11:30 -0000 1.6 --- RubyBuilder.java 30 Mar 2005 00:12:29 -0000 1.7 *************** *** 19,24 **** --- 19,26 ---- import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; + import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.preferences.IEclipsePreferences; import org.jruby.lexer.yacc.SyntaxException; + import org.rubypeople.rdt.core.IRubyModelMarker; import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.internal.core.parser.MarkerUtility; *************** *** 34,41 **** private static final boolean DEBUG = false; private IProject currentProject; private int totalWork = 10000; ! public RubyBuilder() {} /* --- 36,58 ---- private static final boolean DEBUG = false; + private static final int MAX_AT_ONCE = 1000; private IProject currentProject; private int totalWork = 10000; + private WorkQueue workQueue; + private boolean compiledAllAtOnce; + private int percentPerUnit = 0; + private int grandTotal = 0; ! private RdtWarnings warnings; ! private RubyParser parser; ! private TaskParser taskParser; ! ! public RubyBuilder() { ! this.workQueue = new WorkQueue(); ! warnings = new RdtWarnings(); ! parser = new RubyParser(warnings); ! IEclipsePreferences preferences = RubyCore.getInstancePreferences(); ! taskParser = new TaskParser(preferences); ! } /* *************** *** 50,56 **** this.currentProject = getProject(); if (currentProject == null || !currentProject.isAccessible()) return returnProjects; ! if (kind == INCREMENTAL_BUILD || kind == AUTO_BUILD) { if (DEBUG) System.out.println("INCREMENTAL build..."); IResourceDelta delta = getDelta(currentProject); List files = getAffectedFiles(delta.getAffectedChildren()); --- 67,76 ---- this.currentProject = getProject(); if (currentProject == null || !currentProject.isAccessible()) return returnProjects; ! ! checkCancel(monitor); ! if (kind == INCREMENTAL_BUILD || kind == AUTO_BUILD) { if (DEBUG) System.out.println("INCREMENTAL build..."); + workQueue.clear(); IResourceDelta delta = getDelta(currentProject); List files = getAffectedFiles(delta.getAffectedChildren()); *************** *** 58,64 **** --- 78,86 ---- System.arraycopy(files.toArray(), 0, fileArray, 0, fileArray.length); compile(fileArray, monitor); + cleanUp(); return returnProjects; } build(monitor); + cleanUp(); // FIXME Get the required projects as in JavaBuilder *************** *** 68,71 **** --- 90,108 ---- } + private void cleanUp() { + workQueue.clear(); + percentPerUnit = 0; + warnings.clear(); + } + + /** + * Check whether the build has been canceled. + * + * @param monitor + */ + public void checkCancel(IProgressMonitor monitor) { + if (monitor != null && monitor.isCanceled()) throw new OperationCanceledException(); + } + private List getAffectedFiles(IResourceDelta[] deltas) { List files = new ArrayList(); *************** *** 90,93 **** --- 127,132 ---- try { + RubyBuilder.removeProblemsAndTasksFor(currentProject); + ArrayList sourceFiles = new ArrayList(33); addAllSourceFiles(sourceFiles); *************** *** 96,99 **** --- 135,140 ---- IFile[] allSourceFiles = new IFile[sourceFiles.size()]; sourceFiles.toArray(allSourceFiles); + workQueue.clear(); + workQueue.addAll(allSourceFiles); compile(allSourceFiles, monitor); } *************** *** 105,108 **** --- 146,160 ---- } + public static void removeProblemsAndTasksFor(IResource resource) { + try { + if (resource != null && resource.exists()) { + resource.deleteMarkers(IRubyModelMarker.RUBY_MODEL_PROBLEM_MARKER, false, IResource.DEPTH_INFINITE); + resource.deleteMarkers(IRubyModelMarker.TASK_MARKER, false, IResource.DEPTH_INFINITE); + } + } catch (CoreException e) { + // assume there were no problems + } + } + protected void addAllSourceFiles(final ArrayList sourceFiles) throws CoreException { currentProject.accept(new IResourceProxyVisitor() { *************** *** 129,147 **** protected void compile(IFile[] units, IProgressMonitor monitor) { int unitsLength = units.length; if (unitsLength == 0) { ! monitor.worked(totalWork); return; } ! ! int percentPerUnit = totalWork / unitsLength; // do them all now for (int i = 0; i < unitsLength; i++) { try { IFile file = units[i]; if (DEBUG) System.out.println("About to compile " + file); //$NON-NLS-1$ ! RdtWarnings warnings = new RdtWarnings(); ! RubyParser parser = new RubyParser(warnings); MarkerUtility.removeMarkers(file); ! try { parser.parse(units[i].getName(), new InputStreamReader(file.getContents())); } catch (SyntaxException e) { --- 181,239 ---- protected void compile(IFile[] units, IProgressMonitor monitor) { int unitsLength = units.length; + grandTotal = unitsLength; + percentPerUnit = totalWork / unitsLength; + + this.compiledAllAtOnce = unitsLength <= MAX_AT_ONCE; + if (this.compiledAllAtOnce) { + // do them all now + doCompile(units, null); + } else { + int i = 0; + boolean compilingFirstGroup = true; + while (i < unitsLength) { + int doNow = unitsLength < MAX_AT_ONCE ? unitsLength : MAX_AT_ONCE; + int index = 0; + IFile[] toCompile = new IFile[doNow]; + while (i < unitsLength && index < doNow) { + // Although it needed compiling when this method was called, + // it may have + // already been compiled when it was referenced by another + // unit. + IFile unit = units[i++]; + if (compilingFirstGroup || workQueue.isWaiting(unit)) { + toCompile[index++] = unit; + } + } + if (index < doNow) System.arraycopy(toCompile, 0, toCompile = new IFile[index], 0, index); + IFile[] additionalUnits = new IFile[unitsLength - i]; + System.arraycopy(units, i, additionalUnits, 0, additionalUnits.length); + compilingFirstGroup = false; + doCompile(toCompile, monitor); + } + } + } + + /* + * Compile the given elements, adding more elements to the work queue if + * they are affected by the changes. + */ + protected void doCompile(IFile[] units, IProgressMonitor monitor) { + int unitsLength = units.length; if (unitsLength == 0) { ! monitor.worked(unitsLength * percentPerUnit); return; } ! // do them all now for (int i = 0; i < unitsLength; i++) { + checkCancel(monitor); try { IFile file = units[i]; if (DEBUG) System.out.println("About to compile " + file); //$NON-NLS-1$ ! String name = file.getFullPath().makeRelative().toString(); ! monitor.subTask(name + ": (" + i + " of " + grandTotal + ")"); ! MarkerUtility.removeMarkers(file); ! try { parser.parse(units[i].getName(), new InputStreamReader(file.getContents())); } catch (SyntaxException e) { *************** *** 149,152 **** --- 241,245 ---- } MarkerUtility.createProblemMarkers(file, warnings.getWarnings()); + warnings.clear(); createTasks(file); monitor.worked(percentPerUnit); *************** *** 155,164 **** } } ! } private void createTasks(IFile file) throws CoreException { - IEclipsePreferences preferences = RubyCore.getInstancePreferences(); - TaskParser taskParser = new TaskParser(preferences); taskParser.parse(new InputStreamReader(file.getContents())); MarkerUtility.createTasks(file, taskParser.getTasks()); --- 248,255 ---- } } ! checkCancel(monitor); } private void createTasks(IFile file) throws CoreException { taskParser.parse(new InputStreamReader(file.getContents())); MarkerUtility.createTasks(file, taskParser.getTasks()); |
|
From: Christopher W. <caw...@us...> - 2005-03-30 00:12:40
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25424/src/org/rubypeople/rdt/internal/core Modified Files: RubyScript.java Log Message: update builder to allow cancelling. Attempt to speed the builder up by not recreating a parser and warnings object for every file. Index: RubyScript.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScript.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** RubyScript.java 12 Mar 2005 15:30:04 -0000 1.11 --- RubyScript.java 30 Mar 2005 00:12:30 -0000 1.12 *************** *** 46,52 **** import org.rubypeople.rdt.core.IRubyElement; import org.rubypeople.rdt.core.IRubyModelStatusConstants; import org.rubypeople.rdt.core.IRubyScript; - import org.rubypeople.rdt.core.IType; import org.rubypeople.rdt.core.ISourceRange; import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.core.RubyModelException; --- 46,53 ---- import org.rubypeople.rdt.core.IRubyElement; import org.rubypeople.rdt.core.IRubyModelStatusConstants; + import org.rubypeople.rdt.core.IRubyProject; import org.rubypeople.rdt.core.IRubyScript; import org.rubypeople.rdt.core.ISourceRange; + import org.rubypeople.rdt.core.IType; import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.core.RubyModelException; *************** *** 107,110 **** --- 108,113 ---- RubyModelManager.PerWorkingCopyInfo perWorkingCopyInfo = getPerWorkingCopyInfo(); + IRubyProject project = getRubyProject(); + boolean computeProblems = RubyProject.hasRubyNature(project.getProject()) && perWorkingCopyInfo != null && perWorkingCopyInfo.isActive(); try { *************** *** 128,148 **** // compute other problems if needed ! perWorkingCopyInfo.beginReporting(); ! RubyScriptProblemFinder.process(this, contents, perWorkingCopyInfo, pm); ! perWorkingCopyInfo.endReporting(); ! return unitInfo.isStructureKnown(); } ! /* * Assume that this is a working copy */ protected void updateTimeStamp(RubyScript original) throws RubyModelException { ! long timeStamp = ! ((IFile) original.getResource()).getModificationStamp(); ! if (timeStamp == IResource.NULL_STAMP) { ! throw new RubyModelException( ! new RubyModelStatus(IRubyModelStatusConstants.INVALID_RESOURCE)); ! } ((RubyScriptElementInfo) getElementInfo()).timestamp = timeStamp; } --- 131,148 ---- // compute other problems if needed ! if (computeProblems) { ! perWorkingCopyInfo.beginReporting(); ! RubyScriptProblemFinder.process(this, contents, perWorkingCopyInfo, pm); ! perWorkingCopyInfo.endReporting(); ! } return unitInfo.isStructureKnown(); } ! /* * Assume that this is a working copy */ protected void updateTimeStamp(RubyScript original) throws RubyModelException { ! long timeStamp = ((IFile) original.getResource()).getModificationStamp(); ! if (timeStamp == IResource.NULL_STAMP) { throw new RubyModelException(new RubyModelStatus(IRubyModelStatusConstants.INVALID_RESOURCE)); } ((RubyScriptElementInfo) getElementInfo()).timestamp = timeStamp; } *************** *** 187,191 **** // lifetime of the working copy } ! /* * @see IRubyScript#getOwner() --- 187,191 ---- // lifetime of the working copy } ! /* * @see IRubyScript#getOwner() *************** *** 261,265 **** } } ! /* * (non-Rubydoc) --- 261,265 ---- } } ! /* * (non-Rubydoc) *************** *** 423,432 **** } } ! /** * @see IRubyScript#commitWorkingCopy(boolean, IProgressMonitor) */ public void commitWorkingCopy(boolean force, IProgressMonitor monitor) throws RubyModelException { ! CommitWorkingCopyOperation op= new CommitWorkingCopyOperation(this, force); op.runOperation(monitor); } --- 423,432 ---- } } ! /** * @see IRubyScript#commitWorkingCopy(boolean, IProgressMonitor) */ public void commitWorkingCopy(boolean force, IProgressMonitor monitor) throws RubyModelException { ! CommitWorkingCopyOperation op = new CommitWorkingCopyOperation(this, force); op.runOperation(monitor); } *************** *** 478,482 **** return super.canBufferBeRemovedFromCache(buffer); } ! /** * @see Openable#hasBuffer() --- 478,482 ---- return super.canBufferBeRemovedFromCache(buffer); } ! /** * @see Openable#hasBuffer() *************** *** 485,489 **** return true; } ! /* * @see IRubyScript#hasResourceChanged() --- 485,489 ---- return true; } ! /* * @see IRubyScript#hasResourceChanged() *************** *** 491,500 **** public boolean hasResourceChanged() { if (!isWorkingCopy()) return false; ! ! // if resource got deleted, then #getModificationStamp() will answer IResource.NULL_STAMP, which is always different from the cached // timestamp Object info = RubyModelManager.getRubyModelManager().getInfo(this); if (info == null) return false; ! return ((RubyScriptElementInfo)info).timestamp != getResource().getModificationStamp(); } --- 491,501 ---- public boolean hasResourceChanged() { if (!isWorkingCopy()) return false; ! ! // if resource got deleted, then #getModificationStamp() will answer ! // IResource.NULL_STAMP, which is always different from the cached // timestamp Object info = RubyModelManager.getRubyModelManager().getInfo(this); if (info == null) return false; ! return ((RubyScriptElementInfo) info).timestamp != getResource().getModificationStamp(); } |
|
From: Christopher W. <caw...@us...> - 2005-03-30 00:12:37
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25424/src/org/rubypeople/rdt/internal/core/parser Modified Files: RdtWarnings.java Log Message: update builder to allow cancelling. Attempt to speed the builder up by not recreating a parser and warnings object for every file. Index: RdtWarnings.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RdtWarnings.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RdtWarnings.java 2 Mar 2005 00:54:04 -0000 1.2 --- RdtWarnings.java 30 Mar 2005 00:12:29 -0000 1.3 *************** *** 73,75 **** --- 73,79 ---- } + public void clear() { + warnings.clear(); + } + } |
|
From: Christopher W. <caw...@us...> - 2005-03-28 23:23:34
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1489 Modified Files: plugin.xml Log Message: apply david corbin's patches Index: plugin.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/plugin.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** plugin.xml 11 Mar 2005 03:21:43 -0000 1.11 --- plugin.xml 28 Mar 2005 23:23:25 -0000 1.12 *************** *** 24,29 **** <import plugin="org.rubypeople.rdt.ui"/> <import plugin="org.rubypeople.rdt.debug.ui"/> - <import plugin="org.eclipse.jface.text"/> <import plugin="org.eclipse.ui.workbench.texteditor"/> </requires> --- 24,29 ---- <import plugin="org.rubypeople.rdt.ui"/> <import plugin="org.rubypeople.rdt.debug.ui"/> <import plugin="org.eclipse.ui.workbench.texteditor"/> + <import plugin="org.eclipse.text"/> </requires> |
|
From: Christopher W. <caw...@us...> - 2005-03-28 23:23:34
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/views In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1489/src/org/rubypeople/rdt/testunit/views Modified Files: FailureTrace.java TestUnitMessages.properties Log Message: apply david corbin's patches Index: FailureTrace.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/views/FailureTrace.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FailureTrace.java 2 Mar 2005 00:54:39 -0000 1.2 --- FailureTrace.java 28 Mar 2005 23:23:24 -0000 1.3 *************** *** 16,19 **** --- 16,27 ---- import java.io.StringReader; + import org.eclipse.jface.action.Action; + import org.eclipse.jface.action.IMenuListener; + import org.eclipse.jface.action.IMenuManager; + import org.eclipse.jface.action.MenuManager; + import org.eclipse.jface.action.ToolBarManager; + import org.eclipse.jface.util.Assert; + import org.eclipse.jface.util.IOpenEventListener; + import org.eclipse.jface.util.OpenStrategy; import org.eclipse.swt.SWT; import org.eclipse.swt.dnd.Clipboard; *************** *** 21,24 **** --- 29,33 ---- import org.eclipse.swt.events.DisposeListener; import org.eclipse.swt.events.SelectionEvent; + import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; *************** *** 28,40 **** import org.eclipse.swt.widgets.TableItem; import org.eclipse.swt.widgets.ToolBar; ! ! import org.eclipse.jface.action.Action; ! import org.eclipse.jface.action.IMenuListener; ! import org.eclipse.jface.action.IMenuManager; ! import org.eclipse.jface.action.MenuManager; ! import org.eclipse.jface.action.ToolBarManager; ! import org.eclipse.jface.util.Assert; ! import org.eclipse.jface.util.IOpenEventListener; ! import org.eclipse.jface.util.OpenStrategy; /** --- 37,41 ---- import org.eclipse.swt.widgets.TableItem; import org.eclipse.swt.widgets.ToolBar; ! import org.rubypeople.rdt.internal.ui.util.StackTraceLine; /** *************** *** 85,88 **** --- 86,97 ---- initMenu(); + fTable.addSelectionListener(new SelectionListener() { + + public void widgetSelected(SelectionEvent e) {} + + public void widgetDefaultSelected(SelectionEvent e) { + new StackTraceLine(getSelectedText()).openEditor(); + } + }); parent.addDisposeListener(new DisposeListener() { *************** *** 119,143 **** private String getSelectedText() { return fTable.getSelection()[0].getText(); ! } ! ! private Action createOpenEditorAction(String pLine) { ! // FIXME This is hard-coded to only .rb extensions ! // FIXME This is duplicated from the ConsoleTracker code in debug.ui ! String file = pLine.substring(0, pLine.indexOf(".rb:") + 3); ! int startOfSuffix = pLine.indexOf(".rb:"); ! if (startOfSuffix == -1) { ! return null; ! } ! int startLineNumber = startOfSuffix + 4 ; ! int endLineNumber = pLine.indexOf(":", startLineNumber); ! if (endLineNumber == -1) { ! endLineNumber = pLine.length(); ! } ! int line = Integer.parseInt(pLine.substring(startLineNumber, endLineNumber)); ! return new OpenEditorAtLineAction(fTestRunner, file, line); } ! private void disposeIcons(){ if (fExceptionIcon != null && !fExceptionIcon.isDisposed()) fExceptionIcon.dispose(); --- 128,138 ---- private String getSelectedText() { return fTable.getSelection()[0].getText(); ! } ! private Action createOpenEditorAction(String traceLine) { ! return new OpenEditorAction(new StackTraceLine(traceLine)); } ! private void disposeIcons(){ if (fExceptionIcon != null && !fExceptionIcon.isDisposed()) fExceptionIcon.dispose(); *************** *** 296,298 **** --- 291,306 ---- return fTable.getShell(); } + + private class OpenEditorAction extends Action { + private final StackTraceLine trace; + + public OpenEditorAction(StackTraceLine trace) { + super(TestUnitMessages.getString("OpenEditor.action.label")); + this.trace = trace; + } + + public void run() { + trace.openEditor(); + } + } } Index: TestUnitMessages.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/views/TestUnitMessages.properties,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TestUnitMessages.properties 24 Nov 2004 15:04:55 -0000 1.9 --- TestUnitMessages.properties 28 Mar 2005 23:23:25 -0000 1.10 *************** *** 1,2 **** --- 1,4 ---- + OpenEditor.action.label=Open + CopyTrace.action.label=Copy Trace CopyTraceAction.problem=Problem Copying to Clipboard *************** *** 147,152 **** --- 149,157 ---- ExpandAllAction.tooltip=Expand All Nodes + LaunchConfigurationTab.RubyEntryPoint.allTestCases=Run all TestCases LaunchConfigurationTab.RubyEntryPoint.classLabel=Test Class: LaunchConfigurationTab.RubyEntryPoint.classSelectorMessage=Choose the test class: + LaunchConfigurationTab.RubyEntryPoint.allTestMethods=Run all tests + LaunchConfigurationTab.RubyEntryPoint.methodLabel=Test Method: RubyClassSelector.Title=Class Selection |
|
From: Christopher W. <caw...@us...> - 2005-03-28 23:23:34
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1489/src/org/rubypeople/rdt/testunit/launcher Modified Files: TestUnitLaunchShortcut.java TestUnitMainTab.java TestUnitRunnerConfiguration.java Log Message: apply david corbin's patches Index: TestUnitRunnerConfiguration.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitRunnerConfiguration.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TestUnitRunnerConfiguration.java 2 Mar 2005 00:54:40 -0000 1.9 --- TestUnitRunnerConfiguration.java 28 Mar 2005 23:23:23 -0000 1.10 *************** *** 59,62 **** --- 59,63 ---- String fileName = ""; String testClass = ""; + String testMethod = ""; // FIXME Remove keepAlive on this end and remove looking for it on // RemoteTestRunner.rb *************** *** 68,83 **** fileName = configuration.getAttribute(TestUnitLaunchConfigurationDelegate.LAUNCH_CONTAINER_ATTR, ""); testClass = configuration.getAttribute(TestUnitLaunchConfigurationDelegate.TESTTYPE_ATTR, ""); } catch (CoreException e) { TestunitPlugin.log(e); } ! return fileName + " " + port + " " + keepAlive + " " + testClass; } public String renderLoadPath() { String absoluteTestFilePath = RdtLaunchingPlugin.osDependentPath(this.getAbsoluteTestFileName()); ! if (absoluteTestFilePath.length() == 0) { ! return super.renderLoadPath(); ! } return super.renderLoadPath() + " -I " + absoluteTestFilePath; } --- 69,83 ---- fileName = configuration.getAttribute(TestUnitLaunchConfigurationDelegate.LAUNCH_CONTAINER_ATTR, ""); testClass = configuration.getAttribute(TestUnitLaunchConfigurationDelegate.TESTTYPE_ATTR, ""); + testMethod = configuration.getAttribute(TestUnitLaunchConfigurationDelegate.TESTNAME_ATTR, ""); } catch (CoreException e) { TestunitPlugin.log(e); } ! return fileName + " " + port + " " + keepAlive + " " + testClass + " " + testMethod; } public String renderLoadPath() { String absoluteTestFilePath = RdtLaunchingPlugin.osDependentPath(this.getAbsoluteTestFileName()); ! if (absoluteTestFilePath.length() == 0) { return super.renderLoadPath(); } return super.renderLoadPath() + " -I " + absoluteTestFilePath; } Index: TestUnitMainTab.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitMainTab.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TestUnitMainTab.java 2 Mar 2005 00:54:40 -0000 1.12 --- TestUnitMainTab.java 28 Mar 2005 23:23:23 -0000 1.13 *************** *** 36,43 **** --- 36,47 ---- import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; + import org.eclipse.swt.events.SelectionEvent; + import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; + import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; + import org.eclipse.swt.widgets.Text; import org.eclipse.ui.dialogs.ElementListSelectionDialog; import org.rubypeople.rdt.core.IRubyElement; *************** *** 53,57 **** /** * @author Chris ! * */ public class TestUnitMainTab extends AbstractLaunchConfigurationTab implements ILaunchConfigurationTab { --- 57,61 ---- /** * @author Chris ! * */ public class TestUnitMainTab extends AbstractLaunchConfigurationTab implements ILaunchConfigurationTab { *************** *** 64,67 **** --- 68,76 ---- protected String lastProject = ""; protected String lastFile = ""; + private Label classLabel; + private Button allClassesCheckBox; + private Button allMethodsCheckBox; + private Label testLabel; + private Text testMethodEditBox; public TestUnitMainTab() { *************** *** 110,114 **** }); ! new Label(composite, SWT.NONE).setText(TestUnitMessages.getString("LaunchConfigurationTab.RubyEntryPoint.classLabel")); classSelector = new RubyClassSelector(composite, fileSelector, projectSelector); classSelector.setBrowseDialogMessage(TestUnitMessages.getString("LaunchConfigurationTab.RubyEntryPoint.classSelectorMessage")); --- 119,137 ---- }); ! allClassesCheckBox = new Button(composite, SWT.CHECK); ! allClassesCheckBox.setText(TestUnitMessages.getString("LaunchConfigurationTab.RubyEntryPoint.allTestCases")); ! allClassesCheckBox.addSelectionListener(new SelectionListener() { ! ! public void widgetSelected(SelectionEvent e) { ! updateLaunchConfigurationDialog(); ! setControlState(); ! } ! ! public void widgetDefaultSelected(SelectionEvent e) {} ! }); ! ! classLabel = new Label(composite, SWT.NONE); ! classLabel.setText(TestUnitMessages.getString("LaunchConfigurationTab.RubyEntryPoint.classLabel")); ! classSelector = new RubyClassSelector(composite, fileSelector, projectSelector); classSelector.setBrowseDialogMessage(TestUnitMessages.getString("LaunchConfigurationTab.RubyEntryPoint.classSelectorMessage")); *************** *** 121,124 **** --- 144,184 ---- }); + allMethodsCheckBox = new Button(composite, SWT.CHECK); + allMethodsCheckBox.setText(TestUnitMessages.getString("LaunchConfigurationTab.RubyEntryPoint.allTestMethods")); + allMethodsCheckBox.addSelectionListener(new SelectionListener() { + + public void widgetSelected(SelectionEvent e) { + updateLaunchConfigurationDialog(); + setControlState(); + } + + public void widgetDefaultSelected(SelectionEvent e) {} + }); + + testLabel = new Label(composite, SWT.NONE); + testLabel.setText(TestUnitMessages.getString("LaunchConfigurationTab.RubyEntryPoint.methodLabel")); + + testMethodEditBox = new Text(composite, SWT.BORDER | SWT.BORDER); + testMethodEditBox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + testMethodEditBox.addModifyListener(new ModifyListener() { + + public void modifyText(ModifyEvent e) { + updateLaunchConfigurationDialog(); + + } + }); + setControlState(); + + } + + private void setControlState() { + boolean allClassesChecked = allClassesCheckBox.getSelection(); + boolean allMethodsChecked = allMethodsCheckBox.getSelection(); + classLabel.setEnabled(!allClassesChecked); + classSelector.setEnabled(!allClassesChecked); + allMethodsCheckBox.setEnabled(!allClassesChecked); + testLabel.setEnabled(!(allClassesChecked || allMethodsChecked)); + testMethodEditBox.setEnabled(!(allClassesChecked || allMethodsChecked)); + } *************** *** 126,130 **** Composite composite = new Composite(parent, SWT.NONE); GridLayout compositeLayout = new GridLayout(); ! compositeLayout.marginWidth = 0; compositeLayout.numColumns = 1; composite.setLayout(compositeLayout); --- 186,190 ---- Composite composite = new Composite(parent, SWT.NONE); GridLayout compositeLayout = new GridLayout(); ! compositeLayout.marginWidth = 10; compositeLayout.numColumns = 1; composite.setLayout(compositeLayout); *************** *** 140,165 **** */ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { ! IResource selectedResource = RubyPlugin.getDefault().getSelectedResource(); ! String projectName = ""; ! String fileName = ""; ! String type = ""; ! ! if (RubyPlugin.getDefault().isRubyFile(selectedResource)) { ! projectName = selectedResource.getProject().getName(); ! fileName = selectedResource.getProjectRelativePath().toString(); ! IRubyElement[] types = TestSearchEngine.findTests((IFile) selectedResource); ! if (types.length > 0) { ! type = types[0].getElementName(); ! } ! } ! configuration.setAttribute(RubyLaunchConfigurationAttribute.PROJECT_NAME, projectName); ! configuration.setAttribute(TestUnitLaunchConfigurationDelegate.LAUNCH_CONTAINER_ATTR, fileName); ! configuration.setAttribute(TestUnitLaunchConfigurationDelegate.TESTTYPE_ATTR, type); ! configuration.setAttribute(TestUnitLaunchConfigurationDelegate.TESTNAME_ATTR, ""); ! // set hidden attribute ! configuration.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "org.rubypeople.rdt.debug.ui.rubySourceLocator"); ! } /* --- 200,225 ---- */ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { ! IResource selectedResource = RubyPlugin.getDefault().getSelectedResource(); ! String projectName = ""; ! String fileName = ""; ! String type = ""; ! if (RubyPlugin.getDefault().isRubyFile(selectedResource)) { ! projectName = selectedResource.getProject().getName(); ! fileName = selectedResource.getProjectRelativePath().toString(); ! IRubyElement[] types = TestSearchEngine.findTests((IFile) selectedResource); ! if (types.length > 0) { ! type = types[0].getElementName(); ! } ! } ! configuration.setAttribute(RubyLaunchConfigurationAttribute.PROJECT_NAME, projectName); ! configuration.setAttribute(TestUnitLaunchConfigurationDelegate.LAUNCH_CONTAINER_ATTR, fileName); ! configuration.setAttribute(TestUnitLaunchConfigurationDelegate.TESTTYPE_ATTR, type); ! configuration.setAttribute(TestUnitLaunchConfigurationDelegate.TESTNAME_ATTR, ""); ! ! // set hidden attribute ! configuration.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "org.rubypeople.rdt.debug.ui.rubySourceLocator"); ! } /* *************** *** 182,186 **** projectSelector.setSelectionText(projectName); fileSelector.setSelectionText(configuration.getAttribute(TestUnitLaunchConfigurationDelegate.LAUNCH_CONTAINER_ATTR, "")); ! classSelector.setSelectionText(configuration.getAttribute(TestUnitLaunchConfigurationDelegate.TESTTYPE_ATTR, "")); } catch (CoreException e) { TestunitPlugin.log(e); --- 242,256 ---- projectSelector.setSelectionText(projectName); fileSelector.setSelectionText(configuration.getAttribute(TestUnitLaunchConfigurationDelegate.LAUNCH_CONTAINER_ATTR, "")); ! ! String testClass = configuration.getAttribute(TestUnitLaunchConfigurationDelegate.TESTTYPE_ATTR, ""); ! classSelector.setSelectionText(testClass); ! if (testClass.length() == 0) { ! allClassesCheckBox.setSelection(true); ! } else { ! String testMethod = configuration.getAttribute(TestUnitLaunchConfigurationDelegate.TESTNAME_ATTR, ""); ! testMethodEditBox.setText(testMethod); ! if (testMethod.length() == 0) allMethodsCheckBox.setSelection(true); ! } ! setControlState(); } catch (CoreException e) { TestunitPlugin.log(e); *************** *** 194,198 **** */ public void performApply(ILaunchConfigurationWorkingCopy configuration) { ! configuration.setAttribute(TestUnitLaunchConfigurationDelegate.TESTTYPE_ATTR, classSelector.getValidatedSelectionText()); configuration.setAttribute(TestUnitLaunchConfigurationDelegate.LAUNCH_CONTAINER_ATTR, fileSelector.getValidatedSelectionText()); } --- 264,276 ---- */ public void performApply(ILaunchConfigurationWorkingCopy configuration) { ! String testMethod = testMethodEditBox.getText(); ! if (allMethodsCheckBox.getSelection()) testMethod = ""; ! String testCaseClass = classSelector.getValidatedSelectionText(); ! if (allClassesCheckBox.getSelection()) { ! testCaseClass = ""; ! testMethod = ""; ! } ! configuration.setAttribute(TestUnitLaunchConfigurationDelegate.TESTNAME_ATTR, testMethod); ! configuration.setAttribute(TestUnitLaunchConfigurationDelegate.TESTTYPE_ATTR, testCaseClass); configuration.setAttribute(TestUnitLaunchConfigurationDelegate.LAUNCH_CONTAINER_ATTR, fileSelector.getValidatedSelectionText()); } Index: TestUnitLaunchShortcut.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchShortcut.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TestUnitLaunchShortcut.java 2 Mar 2005 00:54:40 -0000 1.8 --- TestUnitLaunchShortcut.java 28 Mar 2005 23:23:23 -0000 1.9 *************** *** 20,24 **** import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.Status; ! import org.eclipse.debug.core.*; import org.eclipse.debug.ui.DebugUITools; import org.eclipse.debug.ui.IDebugModelPresentation; --- 20,28 ---- import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.Status; ! import org.eclipse.debug.core.DebugPlugin; ! import org.eclipse.debug.core.ILaunchConfiguration; ! import org.eclipse.debug.core.ILaunchConfigurationType; ! import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; ! import org.eclipse.debug.core.ILaunchManager; import org.eclipse.debug.ui.DebugUITools; import org.eclipse.debug.ui.IDebugModelPresentation; *************** *** 39,43 **** import org.rubypeople.rdt.testunit.TestunitPlugin; import org.rubypeople.rdt.testunit.views.TestUnitMessages; - import org.rubypeople.rdt.ui.RubyElementLabelProvider; public class TestUnitLaunchShortcut implements ILaunchShortcut { --- 43,46 ---- *************** *** 89,107 **** try { String container = getContainer(rubyElement); IRubyElement[] classes = TestSearchEngine.findTests((IFile) rubyElement.getUnderlyingResource()); - String testClass = null; - if (classes.length == 0) { - MessageDialog.openInformation(getShell(), TestUnitMessages.getString("LaunchTestAction.dialog.title"), TestUnitMessages.getString("LaunchTestAction.message.notests")); //$NON-NLS-1$ //$NON-NLS-2$ - } else if (classes.length > 1) { - testClass = chooseType(classes, mode); - } else { - testClass = classes[0].getElementName(); - } - if (testClass != null) { - ILaunchConfiguration config = findOrCreateLaunchConfiguration(rubyElement, mode, container, testClass, ""); - if (config != null) { - config.launch(mode, null); - } - } } catch (CoreException e) { log(e); --- 92,99 ---- try { String container = getContainer(rubyElement); + ILaunchConfiguration config = findOrCreateLaunchConfiguration(rubyElement, mode, container, "", ""); + if (config != null) + config.launch(mode, null); IRubyElement[] classes = TestSearchEngine.findTests((IFile) rubyElement.getUnderlyingResource()); } catch (CoreException e) { log(e); *************** *** 109,131 **** } - /** - * Prompts the user to select a type - * - * @return the selected type or <code>null</code> if none. - */ - protected String chooseType(IRubyElement[] types, String mode) { - ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), new RubyElementLabelProvider()); - dialog.setElements(types); - dialog.setTitle(TestUnitMessages.getString("LaunchTestAction.dialog.title2")); //$NON-NLS-1$ - if (mode.equals(ILaunchManager.DEBUG_MODE)) { - dialog.setMessage(TestUnitMessages.getString("LaunchTestAction.message.selectTestToRun")); //$NON-NLS-1$ - } else { - dialog.setMessage(TestUnitMessages.getString("LaunchTestAction.message.selectTestToDebug")); //$NON-NLS-1$ - } - dialog.setMultipleSelection(false); - if (dialog.open() == Window.OK) { return ((IRubyElement) dialog.getFirstResult()).getElementName(); } - return null; - } - protected ILaunchConfiguration findOrCreateLaunchConfiguration(IRubyElement rubyElement, String mode, String container, String testClass, String testName) throws CoreException { IFile rubyFile = (IFile) rubyElement.getUnderlyingResource(); --- 101,104 ---- *************** *** 137,141 **** for (int i = 0; i < configs.length; i++) { ILaunchConfiguration config = configs[i]; ! if ((config.getAttribute(TestUnitLaunchConfigurationDelegate.LAUNCH_CONTAINER_ATTR, "").equals(container)) && (config.getAttribute(TestUnitLaunchConfigurationDelegate.TESTTYPE_ATTR, "").equals(testClass)) && (config.getAttribute(TestUnitLaunchConfigurationDelegate.TESTNAME_ATTR, "").equals(testName)) && (config.getAttribute(RubyLaunchConfigurationAttribute.PROJECT_NAME, "").equals(rubyFile.getProject().getName()))) { candidateConfigs.add(config); } --- 110,117 ---- for (int i = 0; i < configs.length; i++) { ILaunchConfiguration config = configs[i]; ! if ((config.getAttribute(TestUnitLaunchConfigurationDelegate.LAUNCH_CONTAINER_ATTR, "").equals(container)) ! && (config.getAttribute(TestUnitLaunchConfigurationDelegate.TESTTYPE_ATTR, "").equals("")) ! && (config.getAttribute(TestUnitLaunchConfigurationDelegate.TESTNAME_ATTR, "").equals(testName)) ! && (config.getAttribute(RubyLaunchConfigurationAttribute.PROJECT_NAME, "").equals(rubyFile.getProject().getName()))) { candidateConfigs.add(config); } *************** *** 143,147 **** switch (candidateConfigs.size()) { case 0: ! return createConfiguration(rubyFile, container, testClass, testName); case 1: return (ILaunchConfiguration) candidateConfigs.get(0); --- 119,123 ---- switch (candidateConfigs.size()) { case 0: ! return createConfiguration(rubyFile, container, testName); case 1: return (ILaunchConfiguration) candidateConfigs.get(0); *************** *** 196,200 **** } ! protected ILaunchConfiguration createConfiguration(IFile rubyFile, String container, String testClass, String testName) { if (RubyRuntime.getDefault().getSelectedInterpreter() == null) { showNoInterpreterDialog(); --- 172,176 ---- } ! protected ILaunchConfiguration createConfiguration(IFile rubyFile, String container, String testName) { if (RubyRuntime.getDefault().getSelectedInterpreter() == null) { showNoInterpreterDialog(); *************** *** 219,223 **** wc.setAttribute(TestUnitLaunchConfigurationDelegate.LAUNCH_CONTAINER_ATTR, container); wc.setAttribute(TestUnitLaunchConfigurationDelegate.TESTNAME_ATTR, testName); ! wc.setAttribute(TestUnitLaunchConfigurationDelegate.TESTTYPE_ATTR, testClass); wc.setAttribute(TestUnitLaunchConfigurationDelegate.PORT_ATTR, port); wc.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "org.rubypeople.rdt.debug.ui.rubySourceLocator"); --- 195,199 ---- wc.setAttribute(TestUnitLaunchConfigurationDelegate.LAUNCH_CONTAINER_ATTR, container); wc.setAttribute(TestUnitLaunchConfigurationDelegate.TESTNAME_ATTR, testName); ! wc.setAttribute(TestUnitLaunchConfigurationDelegate.TESTTYPE_ATTR, ""); wc.setAttribute(TestUnitLaunchConfigurationDelegate.PORT_ATTR, port); wc.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "org.rubypeople.rdt.debug.ui.rubySourceLocator"); |
|
From: Christopher W. <caw...@us...> - 2005-03-28 23:23:33
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/ruby In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1489/ruby Modified Files: RemoteTestRunner.rb Log Message: apply david corbin's patches Index: RemoteTestRunner.rb =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/ruby/RemoteTestRunner.rb,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** RemoteTestRunner.rb 2 Mar 2005 00:54:40 -0000 1.10 --- RemoteTestRunner.rb 28 Mar 2005 23:23:24 -0000 1.11 *************** *** 71,76 **** def getTestId(test) @tests << test ! return test.object_id if test.respond_to? :object_id ! return test.id end --- 71,75 ---- def getTestId(test) @tests << test ! return test.respond_to?(:object_id) ? test.object_id : test.id end *************** *** 166,174 **** def test_started(name) test = get_test(name) ! if test.respond_to? :object_id ! @last_test_id = test.object_id ! else ! @last_test_id = test.id ! end @last_test_name = name output_single("%TESTS #{@last_test_id},#{name}\n") --- 165,169 ---- def test_started(name) test = get_test(name) ! @last_test_id = test.respond_to?(:object_id) ? test.object_id : test.id @last_test_name = name output_single("%TESTS #{@last_test_id},#{name}\n") *************** *** 196,199 **** --- 191,212 ---- end end + + module RDT + def self.buildSuite name + suite = TestSuite.new(name) + sub_suites = [] + + ::ObjectSpace.each_object(Class) do |klass| + if(Test::Unit::TestCase > klass) + sub_suites << klass.suite + end + end + + sub_suites.sort! {|a,b| a.name <=> b.name } + sub_suites.each {|s| suite << s} + + suite + end + end end end *************** *** 230,246 **** # 2. port # 3. keepAlive ! # 4. test class name ! # 5. test name (optional, unused right now) # filename = ARGV[0].slice(0, ARGV[0].rindex('.')) - require filename.gsub(/.+::/, '') port = ARGV[1].to_i keepAliveString = ARGV[2] testClass = ARGV[3] ! #testMethod = ARGV[4] session = createTcpSession('127.0.0.1', port) - testSuite = eval(testClass) remoteTestRunner = Test::Unit::UI::Eclipse::TestRunner.new(testSuite, session) remoteTestRunner.start --- 243,267 ---- # 2. port # 3. keepAlive ! # 4. test class name (optional) ! # 5. test name (optional) # filename = ARGV[0].slice(0, ARGV[0].rindex('.')) port = ARGV[1].to_i keepAliveString = ARGV[2] testClass = ARGV[3] ! testMethod = ARGV[4] ! ! require filename.gsub(/.+::/, '') ! ! if (testMethod) ! testSuite = eval(testClass).new(testMethod) ! elsif testClass ! testSuite = eval(testClass) ! else ! testSuite = Test::Unit::RDT.buildSuite filename ! end session = createTcpSession('127.0.0.1', port) remoteTestRunner = Test::Unit::UI::Eclipse::TestRunner.new(testSuite, session) remoteTestRunner.start *************** *** 248,250 **** exit end - --- 269,270 ---- |
|
From: Christopher W. <caw...@us...> - 2005-03-28 23:23:26
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1359/src/org/rubypeople/rdt/internal/debug/ui/tests Modified Files: TC_RubyConsoleTracker.java Log Message: apply david corbin's patches Index: TC_RubyConsoleTracker.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/tests/TC_RubyConsoleTracker.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TC_RubyConsoleTracker.java 3 May 2004 17:17:30 -0000 1.1 --- TC_RubyConsoleTracker.java 28 Mar 2005 23:23:02 -0000 1.2 *************** *** 1,5 **** package org.rubypeople.rdt.internal.debug.ui.tests; ! import junit.framework.Assert; import junit.framework.TestCase; --- 1,7 ---- package org.rubypeople.rdt.internal.debug.ui.tests; ! import java.util.ArrayList; ! import java.util.List; ! import junit.framework.TestCase; *************** *** 14,30 **** import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IRegion; - import org.eclipse.jface.text.Region; import org.rubypeople.rdt.internal.debug.ui.console.RubyConsoleTracker; import org.rubypeople.rdt.internal.debug.ui.console.RubyStackTraceHyperlink; public class TC_RubyConsoleTracker extends TestCase { ! public TC_RubyConsoleTracker(String name) { ! super(name); ! } ! ! protected void setUp() { } ! public void testCorrect() throws Exception { //data/test/configFile.rb:1:in `require': No such file to load -- inifile (LoadError) --- 16,34 ---- import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IRegion; import org.rubypeople.rdt.internal.debug.ui.console.RubyConsoleTracker; import org.rubypeople.rdt.internal.debug.ui.console.RubyStackTraceHyperlink; + import org.rubypeople.rdt.internal.debug.ui.console.RubyConsoleTracker.FileExistanceChecker; public class TC_RubyConsoleTracker extends TestCase { ! private static final String SYNTAX_IN_REQUIRE = " /RdtTest/FooTest.rb:2:in `require': /RdtTestLib/anotherFile.rb:9: parse error (SyntaxError)"; ! private TestConsole console; ! private MockFileExistanceChecker fileChecker; ! ! public void setUp() throws Exception { ! fileChecker = new MockFileExistanceChecker(); ! console = new TestConsole(fileChecker); } ! public void testCorrect() throws Exception { //data/test/configFile.rb:1:in `require': No such file to load -- inifile (LoadError) *************** *** 32,104 **** // * from /data/test/fetchmail.rb:2:in `require' ! TestConsole console = new TestConsole() ; console.lineAppend("/d/t.rb:1:in `require': No such file to load -- inifile (LoadError)") ; ! RubyStackTraceHyperlink link = console.getLink() ; ! Assert.assertNotNull(link) ; ! Assert.assertEquals(0, console.getOffset()) ; ! Assert.assertEquals(9, console.getLength()) ; ! Assert.assertEquals("/d/t.rb", link.getFilename()) ; ! Assert.assertEquals(1, link.getLineNumber()) ; ! console.lineAppend(" from c:/d/abc.rb:99") ; ! link = console.getLink() ; ! Assert.assertNotNull(link) ; ! Assert.assertEquals(8, console.getOffset()) ; ! Assert.assertEquals(14, console.getLength()) ; ! Assert.assertEquals("c:/d/abc.rb", link.getFilename()) ; ! Assert.assertEquals(99, link.getLineNumber()) ; ! // Another one directly following ! console.lineAppend("/name with from in the middle/rb.rb:123") ; ! link = console.getLink() ; ! Assert.assertNotNull(link) ; ! Assert.assertEquals(0, console.getOffset()) ; ! Assert.assertEquals(39, console.getLength()) ; ! Assert.assertEquals("/name with from in the middle/rb.rb", link.getFilename()) ; ! Assert.assertEquals(123, link.getLineNumber()) ; ! } public void testSecondWithoutFirst() throws Exception { ! TestConsole console = new TestConsole() ; ! console.lineAppend(" from c:/d/abc.rb:99") ; ! RubyStackTraceHyperlink link = console.getLink() ; ! Assert.assertNotNull(link) ; ! Assert.assertEquals(8, console.getOffset()) ; ! Assert.assertEquals("c:/d/abc.rb", link.getFilename()) ; } public void testInCorrect() throws Exception { ! ! TestConsole console = new TestConsole() ; console.lineAppend("/d/t.rb:a:in `require': No such file to load -- inifile (LoadError)") ; ! RubyStackTraceHyperlink link = console.getLink() ; ! Assert.assertNull(link) ; ! console.lineAppend("/d/t.rb:123 ") ; ! Assert.assertNull(link) ; } - public class TestConsole implements IConsole { ! private RubyStackTraceHyperlink link; ! private int offset ; ! private int length ; SimpleDocument doc = new SimpleDocument() ; RubyConsoleTracker tracker ; ! public TestConsole() throws Exception { ! tracker = new RubyConsoleTracker(); tracker.init(this) ; } public void addLink(IConsoleHyperlink pLink, int pOffset, int pLength) { ! this.link = (RubyStackTraceHyperlink) pLink ; ! this.offset = pOffset ; ! this.length = pLength ; } public void connect(IStreamMonitor streamMonitor, String streamIdentifer) { ! // TODO Auto-generated method stub } public void connect(IStreamsProxy streamsProxy) { ! // TODO Auto-generated method stub } public IDocument getDocument() { --- 36,131 ---- // * from /data/test/fetchmail.rb:2:in `require' ! fileChecker.addKnownFile("/d/t.rb"); ! fileChecker.addKnownFile("c:/d/abc.rb"); ! console.lineAppend("/d/t.rb:1:in `require': No such file to load -- inifile (LoadError)") ; ! console.lineAppend("\tfrom c:/d/abc.rb:99") ; ! console.lineAppend(" /name with from in the middle/rb.rb:123") ; + console.assertLink(0, 9, "/d/t.rb", 1, 0); + console.assertLink(6, 14, "c:/d/abc.rb", 99, 1); + console.assertLinkCount(2); + } + + public void testSyntaxErrorInRequire() throws Exception { + fileChecker.addKnownFile("/RdtTest/FooTest.rb"); + fileChecker.addKnownFile("/RdtTestLib/anotherFile.rb"); + + console.lineAppend(SYNTAX_IN_REQUIRE) ; + + console.assertLinkCount(2); + console.assertLink( 1, 21, "/RdtTest/FooTest.rb", 2, 0); + console.assertLink(37, 28, "/RdtTestLib/anotherFile.rb", 9, 1); } public void testSecondWithoutFirst() throws Exception { ! fileChecker.addKnownFile("c:/d/abc.rb"); ! ! console.lineAppend("\tfrom c:/d/abc.rb:99") ; ! ! console.assertLink(6, 14, "c:/d/abc.rb", 99, 0); } public void testInCorrect() throws Exception { ! fileChecker.addKnownFile("/d/t.rb"); ! console.lineAppend("/d/t.rb:a:in `require': No such file to load -- inifile (LoadError)") ; ! console.lineAppend("/d/t.rb:123 "); ! console.assertLinkCount(0); ! } ! ! private final class MockFileExistanceChecker implements RubyConsoleTracker.FileExistanceChecker { ! private List knownFiles = new ArrayList(); ! ! public void addKnownFile(String filename) { ! knownFiles.add(filename); ! } ! public boolean fileExists(String filename) { ! return knownFiles.contains(filename); ! } } public class TestConsole implements IConsole { ! private class MetaLink { ! public RubyStackTraceHyperlink link; ! public int offset; ! public int length; ! } ! ! private List metaLinks = new ArrayList(); SimpleDocument doc = new SimpleDocument() ; RubyConsoleTracker tracker ; ! public TestConsole(FileExistanceChecker fileChecker) throws Exception { ! tracker = new RubyConsoleTracker(fileChecker); tracker.init(this) ; } + public void assertLinkCount(int expectedLinkCount) { + assertEquals(expectedLinkCount, metaLinks.size()); + } + + public void assertLink(int expectedOffset, int expectedLength, String expectedFilename, int expectedLineNumber, int linkIndex) { + MetaLink metaLink = (MetaLink) metaLinks.get(linkIndex); + assertNotNull(metaLink); + assertEquals("Offset of link["+linkIndex+"]", expectedOffset, metaLink.offset); + assertEquals(expectedLength, metaLink.length); + assertEquals(expectedFilename, metaLink.link.getFilename()); + assertEquals(expectedLineNumber, metaLink.link.getLineNumber()); + } + public void addLink(IConsoleHyperlink pLink, int pOffset, int pLength) { ! MetaLink metaLink = new MetaLink(); ! metaLink.link = (RubyStackTraceHyperlink) pLink ; ! metaLink.offset = pOffset ; ! metaLink.length = pLength ; ! ! metaLinks.add(metaLink); } public void connect(IStreamMonitor streamMonitor, String streamIdentifer) { ! throw new RuntimeException("Not Implemented Exception"); } public void connect(IStreamsProxy streamsProxy) { ! throw new RuntimeException("Not Implemented Exception"); } public IDocument getDocument() { *************** *** 106,114 **** } public IProcess getProcess() { ! // TODO Auto-generated method stub ! return null; } public IRegion getRegion(IConsoleHyperlink link) { ! return new Region(this.getOffset(), this.getLength()) ; } --- 133,140 ---- } public IProcess getProcess() { ! throw new RuntimeException("Not Implemented Exception"); } public IRegion getRegion(IConsoleHyperlink link) { ! throw new RuntimeException("Not Implemented Exception"); } *************** *** 117,132 **** tracker.lineAppended(doc.getLineInformationOfOffset(1)) ; } - - public RubyStackTraceHyperlink getLink() { - return link; - } - - public int getLength() { - return length; - } - - public int getOffset() { - return offset; - } } --- 143,146 ---- |
|
From: Christopher W. <caw...@us...> - 2005-03-28 23:23:06
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1314/src/org/rubypeople/rdt/internal/ui Modified Files: TS_UiTests.java Added Files: TC_StackTraceLine.java Log Message: apply david corbin's patches --- NEW FILE: TC_StackTraceLine.java --- /******************************************************************************* * Copyright (c) 2005 David Corbin and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * David Corbin: dc...@us... *******************************************************************************/ package org.rubypeople.rdt.internal.ui; import org.rubypeople.rdt.internal.ui.util.StackTraceLine; import junit.framework.TestCase; public class TC_StackTraceLine extends TestCase { private static final String RUBY_CONSOLE_TEST_FAILURE = "testA(BTest) [/RdtTestLib/anotherFile.rb:12]:"; private static final String TEST_UNIT_VIEW_BACKTRACE = " /RdtTestLib/anotherFile.rb:12"; private static final String BACKTRACE_WITH_IN = " /RdtTestLib/anotherFile.rb:12:in `testB'"; private static final String WITH_FROM = "\tfrom /RdtTestLib/anotherFile.rb:4"; private static final String ODD_WITH_FROM = " ^ from /RdtTestLib/anotherFile.rb:4"; private static final String WITH_OUT_FROM = "/RdtTestLib/anotherFile.rb:4"; private static final String WITH_TRAILING_SPACE = "/RdtTestLib/anotherFile.rb:4 "; public void testWithFrom() { assertFalse("has a stack trace", StackTraceLine.isTraceLine(WITH_TRAILING_SPACE)); } public void testWithTrailingSpace() { assertTrue("has a stack trace", StackTraceLine.isTraceLine(WITH_FROM)); StackTraceLine traceLine = new StackTraceLine(WITH_FROM); assertEquals("Filename", "/RdtTestLib/anotherFile.rb", traceLine.getFilename()); assertEquals("Line Number", 4, traceLine.getLineNumber()); assertEquals("Offset", 6, traceLine.offset()); assertEquals("Length", 28, traceLine.length()); } public void testWithOutFrom() { assertTrue("has a stack trace", StackTraceLine.isTraceLine(WITH_OUT_FROM)); StackTraceLine traceLine = new StackTraceLine(WITH_OUT_FROM); assertEquals("Filename", "/RdtTestLib/anotherFile.rb", traceLine.getFilename()); assertEquals("Line Number", 4, traceLine.getLineNumber()); assertEquals("Offset", 0, traceLine.offset()); assertEquals("Length", 28, traceLine.length()); } public void testOddWithFrom() { assertTrue("has a stack trace", StackTraceLine.isTraceLine(ODD_WITH_FROM)); StackTraceLine traceLine = new StackTraceLine(ODD_WITH_FROM); assertEquals("Filename", "/RdtTestLib/anotherFile.rb", traceLine.getFilename()); assertEquals("Line Number", 4, traceLine.getLineNumber()); assertEquals("Offset", 8, traceLine.offset()); assertEquals("Length", 28, traceLine.length()); } public void testBacktraceWithInTestFailure() { assertTrue("has a stack trace", StackTraceLine.isTraceLine(BACKTRACE_WITH_IN)); StackTraceLine traceLine = new StackTraceLine(BACKTRACE_WITH_IN); assertEquals("Filename", "/RdtTestLib/anotherFile.rb", traceLine.getFilename()); assertEquals("Line Number", 12, traceLine.getLineNumber()); assertEquals("Offset", 3, traceLine.offset()); assertEquals("Length", 29, traceLine.length()); } public void testConsoleTestFailure() { assertTrue(StackTraceLine.isTraceLine(RUBY_CONSOLE_TEST_FAILURE)); StackTraceLine traceLine = new StackTraceLine(RUBY_CONSOLE_TEST_FAILURE); assertEquals("Filename", "/RdtTestLib/anotherFile.rb", traceLine.getFilename()); assertEquals("Line Number", 12, traceLine.getLineNumber()); assertEquals("Offset", 14, traceLine.offset()); assertEquals("Length", 29, traceLine.length()); } public void testTestUnitViewBackTrace() { StackTraceLine traceLine = new StackTraceLine(TEST_UNIT_VIEW_BACKTRACE); assertEquals("Filename", "/RdtTestLib/anotherFile.rb", traceLine.getFilename()); assertEquals("Line Number", 12, traceLine.getLineNumber()); assertEquals("Offset", 3, traceLine.offset()); assertEquals("Length", 29, traceLine.length()); } } Index: TS_UiTests.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/TS_UiTests.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TS_UiTests.java 12 Mar 2005 15:41:31 -0000 1.2 --- TS_UiTests.java 28 Mar 2005 23:22:49 -0000 1.3 *************** *** 9,12 **** --- 9,13 ---- TestSuite suite = new TestSuite(); suite.addTestSuite(TC_RubyViewerFilter.class); + suite.addTestSuite(TC_StackTraceLine.class); suite.addTestSuite(TC_ResourceAdapterFactory.class); return suite; |
|
From: Christopher W. <caw...@us...> - 2005-03-28 23:22:54
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1245/src/org/rubypeople/rdt/internal/ui/util Added Files: StackTraceLine.java Log Message: apply david corbin's patches --- NEW FILE: StackTraceLine.java --- /******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM Corporation - initial API and implementation * Sebastian Davids: sd...@gm... bug 37333, 26653 * David Corbin: dc...@us... - editor opening *******************************************************************************/ package org.rubypeople.rdt.internal.ui.util; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; import org.eclipse.ui.IEditorDescriptor; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorRegistry; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.part.FileEditorInput; import org.eclipse.ui.texteditor.ITextEditor; import org.rubypeople.rdt.internal.ui.RubyPlugin; import org.rubypeople.rdt.internal.ui.rubyeditor.ExternalRubyFileEditorInput; public class StackTraceLine { // for better matching with 1.8, append /:in `(.*)'/ to the regex private static Pattern OPEN_TRACE_LINE_PATTERN = Pattern.compile("\\s*(\\S.*?):(\\d+)(:|$)"); private static Pattern BRACKETED_TRACE_LINE_PATTERN = Pattern.compile("\\[(.*):(\\d+)\\]:"); private static Pattern OPTIONAL_PREFIX = Pattern.compile("^[ \\t^]*from "); private String fFilename; private int fLineNumber; private int length; private int offset; public static boolean isTraceLine(String line) { Matcher bracketedMatcher = BRACKETED_TRACE_LINE_PATTERN.matcher(line); Matcher openMatcher = OPEN_TRACE_LINE_PATTERN.matcher(line); return bracketedMatcher.find() || openMatcher.find(); } public StackTraceLine(String traceLine) { int prefix = 0; Matcher matcher = OPTIONAL_PREFIX.matcher(traceLine); if (matcher.find()) { traceLine = traceLine.substring(matcher.group(0).length()); prefix = matcher.group(0).length(); } matcher = BRACKETED_TRACE_LINE_PATTERN.matcher(traceLine); if (!matcher.find()) { matcher = OPEN_TRACE_LINE_PATTERN.matcher(traceLine); if (!matcher.find()) return; } fFilename = matcher.group(1); String lineNumber = matcher.group(2); fLineNumber = Integer.parseInt(lineNumber); offset = matcher.start(1) + prefix; length = fFilename.length()+lineNumber.length()+1; } public void openEditor() { try { if (fFilename == null) return; IEditorInput fileEditorInput = createEditorInput(fFilename); IWorkbench workbench = PlatformUI.getWorkbench(); IEditorRegistry editorRegistry = workbench.getEditorRegistry(); IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage(); IEditorDescriptor descriptor = editorRegistry.getDefaultEditor(fFilename); if (descriptor == null) return; ITextEditor editor = (ITextEditor) page.openEditor(fileEditorInput, editorId(descriptor)); setEditorPosition(fLineNumber, editor); } catch (PartInitException e) { RubyPlugin.log(e); } } private void setEditorPosition(int lineNumber, ITextEditor editor) { try { if (lineNumber > 0) { IDocument document= editor.getDocumentProvider().getDocument(editor.getEditorInput()); editor.selectAndReveal(document.getLineOffset(lineNumber-1), document.getLineLength(lineNumber-1)); } } catch (BadLocationException doNothing) { } } private IEditorInput createEditorInput(String filename) { IFile file = getWorkspaceFile(filename); if (file == null) return new ExternalRubyFileEditorInput(new java.io.File(filename)); return new FileEditorInput(file); } private IFile getWorkspaceFile(String filename) { IWorkspace workspace = ResourcesPlugin.getWorkspace(); IWorkspaceRoot root = workspace.getRoot(); IPath filepath = new Path(filename); IFile file = root.getFileForLocation(filepath); return file; } private static String editorId(IEditorDescriptor descriptor) { String editorId; if (descriptor == null) { editorId = "org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$ } else { editorId = descriptor.getId(); } return editorId; } public int getLineNumber() { return fLineNumber; } public String getFilename() { return fFilename; } public int offset() { return offset; } public int length() { return length; } } |
|
From: Christopher W. <caw...@us...> - 2005-03-28 23:22:49
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1173/src/org/rubypeople/rdt/internal/debug/ui/console Modified Files: RubyStackTraceHyperlink.java RubyConsoleTracker.java Log Message: apply david corbin's patches Index: RubyStackTraceHyperlink.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/console/RubyStackTraceHyperlink.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RubyStackTraceHyperlink.java 5 Mar 2005 15:19:08 -0000 1.3 --- RubyStackTraceHyperlink.java 28 Mar 2005 23:22:40 -0000 1.4 *************** *** 38,41 **** --- 38,42 ---- import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiPlugin; import org.rubypeople.rdt.internal.debug.ui.RubySourceLocator; + import org.rubypeople.rdt.internal.ui.util.StackTraceLine; /** *************** *** 45,53 **** private IConsole fConsole; ! private RubyConsoleTracker.StackFrameInfo stackFrameInfo; ! public RubyStackTraceHyperlink(IConsole console, RubyConsoleTracker.StackFrameInfo pStackFrameInfo) { fConsole = console; ! stackFrameInfo = pStackFrameInfo; } --- 46,54 ---- private IConsole fConsole; ! private StackTraceLine fTraceLine; ! public RubyStackTraceHyperlink(IConsole console, StackTraceLine line) { fConsole = console; ! fTraceLine = line; } *************** *** 95,105 **** if (!(sourceLocator instanceof RubySourceLocator)) { return; } rubySourceLocator = (RubySourceLocator) sourceLocator; ! String filename; ! try { ! filename = this.getFilename(); ! } catch (BadLocationException e1) { ! RdtDebugUiPlugin.log(new Status(IStatus.ERROR, RdtDebugUiPlugin.PLUGIN_ID, 0, "Could not get filname from stackframe.", e1)); ! return ; ! } try { Object sourceElement = rubySourceLocator.getSourceElement(filename); --- 96,100 ---- if (!(sourceLocator instanceof RubySourceLocator)) { return; } rubySourceLocator = (RubySourceLocator) sourceLocator; ! String filename = this.getFilename(); try { Object sourceElement = rubySourceLocator.getSourceElement(filename); *************** *** 126,139 **** */ public int getLineNumber() { ! try { ! return Integer.parseInt(stackFrameInfo.lineNumber); ! } catch (NumberFormatException e) { ! // stackFrameInfo.lineNumber is a verified number ; ! return 0; ! } } ! public String getFilename() throws BadLocationException { ! return this.getLinkText().substring(0, stackFrameInfo.nameEnd - stackFrameInfo.start); } --- 121,129 ---- */ public int getLineNumber() { ! return fTraceLine.getLineNumber(); } ! public String getFilename() { ! return fTraceLine.getFilename(); } Index: RubyConsoleTracker.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/console/RubyConsoleTracker.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RubyConsoleTracker.java 5 Mar 2005 15:19:08 -0000 1.3 --- RubyConsoleTracker.java 28 Mar 2005 23:22:40 -0000 1.4 *************** *** 21,24 **** --- 21,26 ---- + import java.io.File; + import org.eclipse.debug.ui.console.IConsole; import org.eclipse.debug.ui.console.IConsoleHyperlink; *************** *** 26,29 **** --- 28,32 ---- import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IRegion; + import org.rubypeople.rdt.internal.ui.util.StackTraceLine; /** *************** *** 39,42 **** --- 42,66 ---- + public interface FileExistanceChecker { + boolean fileExists(String filename); + } + + public static class StandardFileExistanceChecker implements FileExistanceChecker{ + + public boolean fileExists(String filename) { + File file = new File(filename); + return file.exists(); + } + } + private final FileExistanceChecker existanceChecker; + + public RubyConsoleTracker() { + this(new StandardFileExistanceChecker()); + } + + public RubyConsoleTracker(FileExistanceChecker existance) { + this.existanceChecker = existance; + } + /** * The console associated with this line tracker *************** *** 52,90 **** ! private StackFrameInfo detectStackFrame(String pLine) { ! // FIXME This is hardcoded to only recognize .rb endings! ! int startOfSuffix = pLine.indexOf(".rb:") ; ! if (startOfSuffix == -1) { ! return null ; ! } ! int startLineNumber = startOfSuffix + 4 ; ! int endLineNumber = pLine.indexOf(":", startLineNumber) ; ! if (endLineNumber == -1) { ! endLineNumber = pLine.length() ; ! } ! String lineNumber = pLine.substring(startLineNumber, endLineNumber) ; ! for (int i = 0; i < lineNumber.length(); i++) { ! char c = lineNumber.charAt(i) ; ! if (c < '0' || c > '9') { ! return null ; ! } ! } ! ! return new StackFrameInfo(0, endLineNumber, startOfSuffix+3, lineNumber) ; ! } - private void setStartPos(String pLine, StackFrameInfo pStackFrameInfo) { - int fromOffset = pLine.indexOf("from ") ; - if (fromOffset == -1) { - return ; - } - for (int i = 0; i < fromOffset; i++) { - char charBeforeFrom = pLine.charAt(i) ; - if (!(charBeforeFrom == ' ' || charBeforeFrom == '\t')) { - return ; - } - } - pStackFrameInfo.start = 5 + fromOffset ; - } /** --- 76,81 ---- ! /** *************** *** 95,106 **** int offset = line.getOffset(); int length = line.getLength(); String text = fConsole.getDocument().get(offset, length); ! StackFrameInfo sfi = this.detectStackFrame(text) ; ! if (sfi == null) { ! return ; } - this.setStartPos(text, sfi) ; - IConsoleHyperlink link = new RubyStackTraceHyperlink(fConsole, sfi); - fConsole.addLink(link, offset + sfi.start, sfi.end - sfi.start); } catch (BadLocationException e) { } --- 86,106 ---- int offset = line.getOffset(); int length = line.getLength(); + int prefix = 0; + String text = fConsole.getDocument().get(offset, length); ! while (StackTraceLine.isTraceLine(text)) { ! StackTraceLine stackTraceLine = new StackTraceLine(text); ! if (! existanceChecker.fileExists(stackTraceLine.getFilename())) ! return; ! IConsoleHyperlink link = new RubyStackTraceHyperlink(fConsole, stackTraceLine); ! fConsole.addLink(link, line.getOffset() + prefix + stackTraceLine.offset() , stackTraceLine.length()); ! ! prefix = stackTraceLine.offset() + stackTraceLine.length(); ! text = text.substring(stackTraceLine.offset() + stackTraceLine.length()); ! if (text.startsWith(":in `require':")) { ! text = text.substring(14); ! prefix += 14; ! } } } catch (BadLocationException e) { } *************** *** 113,131 **** fConsole = null; } - - public class StackFrameInfo { - - public StackFrameInfo(int pPosStart, int pPosEnd, int pNameEnd, String pLineNumber) { - start = pPosStart ; - end = pPosEnd ; - lineNumber = pLineNumber; - nameEnd = pNameEnd ; - } - public int start ; - public int nameEnd ; - public int end ; - public String lineNumber ; - } - } --- 113,116 ---- |
|
From: Christopher W. <caw...@us...> - 2005-03-28 23:22:49
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1173 Modified Files: plugin.xml Log Message: apply david corbin's patches Index: plugin.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/plugin.xml,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** plugin.xml 9 Mar 2005 04:14:26 -0000 1.40 --- plugin.xml 28 Mar 2005 23:22:39 -0000 1.41 *************** *** 29,33 **** <import plugin="org.eclipse.ui.ide"/> <import plugin="org.eclipse.ui.cheatsheets"/> - <import plugin="org.eclipse.ui.console"/> <import plugin="org.eclipse.core.runtime"/> </requires> --- 29,32 ---- |
|
From: Christopher W. <caw...@us...> - 2005-03-28 23:22:48
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1173/src/org/rubypeople/rdt/internal/debug/ui/actions Modified Files: ManageBreakpointRulerAction.java Log Message: apply david corbin's patches Index: ManageBreakpointRulerAction.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/actions/ManageBreakpointRulerAction.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ManageBreakpointRulerAction.java 20 Mar 2004 15:38:56 -0000 1.5 --- ManageBreakpointRulerAction.java 28 Mar 2005 23:22:39 -0000 1.6 *************** *** 38,41 **** --- 38,42 ---- */ public class ManageBreakpointRulerAction extends Action implements IUpdate { + private IVerticalRulerInfo fRuler; private ITextEditor fTextEditor; *************** *** 60,64 **** } ! /* (non-Javadoc) * @see org.eclipse.ui.texteditor.IUpdate#update() */ --- 61,67 ---- } ! /* ! * (non-Javadoc) ! * * @see org.eclipse.ui.texteditor.IUpdate#update() */ *************** *** 84,93 **** AbstractMarkerAnnotationModel model = getAnnotationModel(); ! if (model == null) { ! return breakpoints; ! } try { ! IMarker[] markers = getResource().findMarkers("org.rubypeople.rdt.debug.core.RubyBreakpointMarker", // IBreakpoint.BREAKPOINT_MARKER, ! false, IResource.DEPTH_INFINITE); IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager(); --- 87,96 ---- AbstractMarkerAnnotationModel model = getAnnotationModel(); ! if (model == null) { return breakpoints; } try { ! IResource resource = getResource(); ! if (resource == null) return breakpoints; ! IMarker[] markers = resource.findMarkers("org.rubypeople.rdt.debug.core.RubyBreakpointMarker", // IBreakpoint.BREAKPOINT_MARKER, ! false, IResource.DEPTH_INFINITE); IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager(); *************** *** 106,113 **** } ! /** ! * Returns the resource for which to create the marker, ! * or <code>null</code> if there is no applicable resource. ! * * @return the resource for which to create the marker or <code>null</code> */ --- 109,116 ---- } ! /** ! * Returns the resource for which to create the marker, or <code>null</code> ! * if there is no applicable resource. ! * * @return the resource for which to create the marker or <code>null</code> */ *************** *** 115,120 **** IEditorInput input = fTextEditor.getEditorInput(); IResource resource = (IResource) input.getAdapter(IFile.class); ! if (resource == null) ! resource = (IResource) input.getAdapter(IResource.class); return resource; } --- 118,122 ---- IEditorInput input = fTextEditor.getEditorInput(); IResource resource = (IResource) input.getAdapter(IFile.class); ! if (resource == null) resource = (IResource) input.getAdapter(IResource.class); return resource; } *************** *** 122,128 **** /** * Checks whether a position includes the ruler's line of activity. ! * ! * @param position the position to be checked ! * @param document the document the position refers to * @return <code>true</code> if the line is included by the given position */ --- 124,132 ---- /** * Checks whether a position includes the ruler's line of activity. ! * ! * @param position ! * the position to be checked ! * @param document ! * the document the position refers to * @return <code>true</code> if the line is included by the given position */ *************** *** 132,140 **** int markerLine = document.getLineOfOffset(position.getOffset()); int line = fRuler.getLineOfLastMouseButtonActivity(); ! if (line == markerLine) { ! return true; ! } ! } catch (BadLocationException x) { ! } } return false; --- 136,141 ---- int markerLine = document.getLineOfOffset(position.getOffset()); int line = fRuler.getLineOfLastMouseButtonActivity(); ! if (line == markerLine) { return true; } ! } catch (BadLocationException x) {} } return false; *************** *** 143,147 **** /** * Returns this action's vertical ruler info. ! * * @return this action's vertical ruler */ --- 144,148 ---- /** * Returns this action's vertical ruler info. ! * * @return this action's vertical ruler */ *************** *** 152,156 **** /** * Returns this action's editor. ! * * @return this action's editor */ --- 153,157 ---- /** * Returns this action's editor. ! * * @return this action's editor */ *************** *** 160,165 **** /** ! * Returns the <code>AbstractMarkerAnnotationModel</code> of the editor's input. ! * * @return the marker annotation model */ --- 161,167 ---- /** ! * Returns the <code>AbstractMarkerAnnotationModel</code> of the editor's ! * input. ! * * @return the marker annotation model */ *************** *** 167,173 **** IDocumentProvider provider = fTextEditor.getDocumentProvider(); IAnnotationModel model = provider.getAnnotationModel(fTextEditor.getEditorInput()); ! if (model instanceof AbstractMarkerAnnotationModel) { ! return (AbstractMarkerAnnotationModel) model; ! } return null; } --- 169,173 ---- IDocumentProvider provider = fTextEditor.getDocumentProvider(); IAnnotationModel model = provider.getAnnotationModel(fTextEditor.getEditorInput()); ! if (model instanceof AbstractMarkerAnnotationModel) { return (AbstractMarkerAnnotationModel) model; } return null; } *************** *** 175,179 **** /** * Returns the <code>IDocument</code> of the editor's input. ! * * @return the document of the editor's input */ --- 175,179 ---- /** * Returns the <code>IDocument</code> of the editor's input. ! * * @return the document of the editor's input */ *************** *** 203,208 **** DebugPlugin.getDefault().getBreakpointManager().removeBreakpoint(breakpoint, true); return; ! } catch (CoreException e) { ! } } --- 203,207 ---- DebugPlugin.getDefault().getBreakpointManager().removeBreakpoint(breakpoint, true); return; ! } catch (CoreException e) {} } |
|
From: Markus B. <mba...@us...> - 2005-03-28 14:12:47
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.build/bootstrap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15796/bootstrap Modified Files: customTargets.xml Log Message: create updateSite before tests, several small changes Index: customTargets.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.build/bootstrap/customTargets.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** customTargets.xml 27 Mar 2005 11:32:38 -0000 1.7 --- customTargets.xml 28 Mar 2005 14:12:36 -0000 1.8 *************** *** 41,45 **** <!-- ===================================================================== --> <target name="getMapFiles"> - <property name="mapVersionTag" value="HEAD" /> <antcall target="getMapFilesWithExtMethod"/> <antcall target="getMapFilesWithPserverMethod"/> --- 41,44 ---- *************** *** 138,146 **** <!-- Steps to do after the build is done. --> <!-- ===================================================================== --> ! <target name="postBuild"> ! <antcall target="test"/> <property name="UpdateSiteStagingLocation" value="${buildDirectory}/updateSite"/> <property name="sitePackagePrefix" value="org.rubypeople.updatesite"/> <antcall target="generateUpdateSite"/> </target> <!-- ===================================================================== --> --- 137,145 ---- <!-- Steps to do after the build is done. --> <!-- ===================================================================== --> ! <target name="postBuild"> <property name="UpdateSiteStagingLocation" value="${buildDirectory}/updateSite"/> <property name="sitePackagePrefix" value="org.rubypeople.updatesite"/> <antcall target="generateUpdateSite"/> + <antcall target="test"/> </target> <!-- ===================================================================== --> *************** *** 149,154 **** <target name="test" unless="dontRunTests"> <echo message="Setting up tests in ${eclipseAutomatedTestHome}"/> <copy file="${buildDirectory}/${buildLabel}/org.rubypeople.rdt-${buildId}.zip" tofile="${eclipseAutomatedTestHome}/eclipse-SDK-RDT-${buildId}.zip" /> ! <copy file="${buildDirectory}/${buildLabel}/org.rubypeople.rdt-tests-${buildId}.zip" tofile="${eclipseAutomatedTestHome}/eclipse-junit-tests-rdt-${buildId}.zip" /> <ant antfile="${eclipseAutomatedTestHome}/test.xml" target="runtests" dir="${eclipseAutomatedTestHome}"> <property name="os" value="${baseos}" /> --- 148,156 ---- <target name="test" unless="dontRunTests"> <echo message="Setting up tests in ${eclipseAutomatedTestHome}"/> + <delete> + <fileset dir="${eclipseAutomatedTestHome}" includes="**/*RDT*.zip"/> + </delete> <copy file="${buildDirectory}/${buildLabel}/org.rubypeople.rdt-${buildId}.zip" tofile="${eclipseAutomatedTestHome}/eclipse-SDK-RDT-${buildId}.zip" /> ! <copy file="${buildDirectory}/${buildLabel}/org.rubypeople.rdt-tests-${buildId}.zip" tofile="${eclipseAutomatedTestHome}/eclipse-junit-tests-RDT-${buildId}.zip" /> <ant antfile="${eclipseAutomatedTestHome}/test.xml" target="runtests" dir="${eclipseAutomatedTestHome}"> <property name="os" value="${baseos}" /> *************** *** 195,199 **** <echo file="${UpdateSiteStagingLocation}/site.xml"><?xml version="1.0" encoding="UTF-8"?> <site> ! <description url="http://rubyeclipse.sourceforge.net/updatesite/nightly/"> The Ruby Development Tools update site. </description> <feature url="features/org.rubypeople.rdt_${featureVersion}.jar" id="org.rubypeople.rdt" version="${featureVersion}"> <category --- 197,201 ---- <echo file="${UpdateSiteStagingLocation}/site.xml"><?xml version="1.0" encoding="UTF-8"?> <site> ! <description url="http://rubyeclipse.sourceforge.net/nightlyBuild/updateSite/"> The Ruby Development Tools update site. </description> <feature url="features/org.rubypeople.rdt_${featureVersion}.jar" id="org.rubypeople.rdt" version="${featureVersion}"> <category |
|
From: Markus B. <mba...@us...> - 2005-03-27 11:36:10
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.build/bootstrap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3194/bootstrap Modified Files: run.bat Log Message: updated docbook.root, path must be relative Index: run.bat =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.build/bootstrap/run.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** run.bat 27 Feb 2005 19:12:55 -0000 1.3 --- run.bat 27 Mar 2005 11:35:59 -0000 1.4 *************** *** 8,12 **** REM This eclipse instance will be the build host REM the AntRunner application is started within this eclipse installation ! set eclipseDir=D:\eclipse\eclipse-3.0.1 REM vm specifies the java vm which starts up the build host --- 8,12 ---- REM This eclipse instance will be the build host REM the AntRunner application is started within this eclipse installation ! set eclipseDir=D:\eclipse\eclipse-3.0.1-noplugins REM vm specifies the java vm which starts up the build host *************** *** 21,32 **** REM It is not bound to reside in the workspace of the eclipse and can reside on any REM accessible location ! set pluginAutomaticBuildDir=D:\build\org.rubypeople.rdt.build\bootstrap REM Directory where the build takes place. The workspace will also be created in this directory ! set buildDirectory=D:\build\rdt REM use pserver method to connect to the repository both for fetching the map files and the plug-ins REM comment out for using ext method ! set usePserver=-DusePserver=true REM Verbose is a switch for the AntRunner application --- 21,33 ---- REM It is not bound to reside in the workspace of the eclipse and can reside on any REM accessible location ! set pluginAutomaticBuildDir=D:\Temp\org.rubypeople.rdt.build\bootstrap REM Directory where the build takes place. The workspace will also be created in this directory ! set buildDirectory=D:\Temp\rdtbuild.stable REM use pserver method to connect to the repository both for fetching the map files and the plug-ins REM comment out for using ext method ! REM set usePserver=-DusePserver=true ! set usePserver= REM Verbose is a switch for the AntRunner application *************** *** 37,42 **** REM (http://213.203.244.123/rdt/docbook.tar.gz). It contains to subfolders: REM docbook-xsl-1.64.1 and dtd ! REM It must be a URI, windows style path names are not allowed ! set docbook.root=D:/Temp/docbook --- 38,44 ---- REM (http://213.203.244.123/rdt/docbook.tar.gz). It contains to subfolders: REM docbook-xsl-1.64.1 and dtd ! REM It must be a relative path to the following directory: ! REM ${buildDirectory}/plugins/org.rubypeople.rdt.doc.user ! set docbook.root=../../../docbook |
|
From: Markus B. <mba...@us...> - 2005-03-27 11:34:15
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.build/bootstrap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2745/bootstrap Modified Files: build.properties Log Message: added properties for dynamic versioning of nightly build Index: build.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.build/bootstrap/build.properties,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** build.properties 26 Mar 2005 06:43:47 -0000 1.6 --- build.properties 27 Mar 2005 11:34:05 -0000 1.7 *************** *** 1,111 **** ! ############################################################################### ! # Copyright (c) 2003, 2004 IBM Corporation and others. ! # All rights reserved. This program and the accompanying materials ! # are made available under the terms of the Common Public License v1.0 ! # which accompanies this distribution, and is available at ! # http://www.eclipse.org/legal/cpl-v10.html ! # ! # Contributors: ! # IBM Corporation - initial API and implementation ! ############################################################################### ! ##################### ! # Parameters describing how and where to execute the build. ! # Typical users need only update the following properties: ! # baseLocation - where things you are building against are installed ! # bootclasspath - The base jars to compile against (typicaly rt.jar) ! # configs - the list of {os, ws, arch} configurations to build. ! # ! # Of course any of the settings here can be overridden by spec'ing ! # them on the command line (e.g., -DbaseLocation=d:/eclipse ! ! ############# CVS CONTROL ################ ! # The CVS tag to use when fetching the map files from the repository ! #mapVersionTag=R2004-11-28_1609_MB_0-5-0 ! mapVersionTag=HEAD ! ! # The CVS tag to use when fetching elements to build. By default the ! # builder will use whatever is in the maps. Use this value to override ! # for example, when doing a nightly build out of HEAD ! #fetchTag=R2004-11-28_1609_MB_0-5-0 ! ! ! ############## BUILD / GENERATION CONTROL ################ ! # The directory into which the build elements will be fetched and where ! # the build will take place. ! # Do not enter relative paths, because otherwise the directory.txt file ! # won't be found ! # If relative , the directory would be relative to the $builder directory ! #buildDirectory=D:\\Temp\\buildresult3 ! ! # Type of build. Used in naming the build output. Typically this value is ! # one of I, N, M, S, ... ! buildType=I ! ! # ID of the build. Used in naming the build output. ! buildId=TestBuild ! ! # Label for the build. Used in naming the build output ! buildLabel=${buildType}.${buildId} ! ! # Timestamp for the build. Used in naming the build output ! timestamp=007 ! ! # Base location for anything the build needs to compile against. For example, ! # when building GEF, the baseLocation should be the location of a previously ! # installed Eclipse against which the GEF code will be compiled. ! #baseLocation=D:\\eclipse-3.0 ! ! #Os/Ws/Arch/nl of the eclipse specified by baseLocation ! #baseos ! #basews ! #basearch ! #basenl ! ! # The location underwhich all of the build output will be collected. ! # This is a subdirectory of $buildDirectory ! # Set collectingFolder and archivePrefix to . if you want to create archives without ! # trailing eclipse in the paths of the included files ! collectingFolder=. ! ! # The prefix that will be used in the generated archive. ! # Does not make sense to use a different archivePrefix than collectingFolder, ! # because zip wouldn't find any files to include into the target zip otherwise ! archivePrefix=. ! ! # The list of {os, ws, arch} configurations to build. This ! # value is a '&' separated list of ',' separate triples. For example, ! # configs=win32,win32,x86 & linux,motif,x86 ! # By default the value is *,*,* ! #configs=*,*,* ! ! #Arguments to send to the zip executable ! # Doesn't work ! #zipArgs=-z "RDT: extract into eclipse-installation directory" ! ! ############# JAVA COMPILER OPTIONS ############## ! # The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE ! #bootclasspath=d:/ibm1.3.1/jre/lib/rt.jar ! #bootclasspath=D:\\java\\j2sdk1.4.2_05\\jre\\lib\\rt.jar ! ! # Whether or not to include debug info in the output jars ! javacDebugInfo=false ! ! # Whether or not to fail the build if there are compiler errors ! javacFailOnError=true ! ! # The version of the source code ! #javaSource=1.3 ! ! # The version of the byte code targeted ! #javacTarget=1.1 ! ! #collPlace=eclipse ! #collBase=. ! #collectingFolder=eclipse ! #archivePrefix=eclipse ! ! #featureVersion ! ! # featureVersion is need for building the org.rubypeople.rdt.doc.user/plugin.xml ! # and for calling the appropriate test in customTargets.xml ! featureVersion=0.6.0 \ No newline at end of file --- 1,126 ---- ! ############################################################################### ! # Copyright (c) 2003, 2004 IBM Corporation and others. ! # All rights reserved. This program and the accompanying materials ! # are made available under the terms of the Common Public License v1.0 ! # which accompanies this distribution, and is available at ! # http://www.eclipse.org/legal/cpl-v10.html ! # ! # Contributors: ! # IBM Corporation - initial API and implementation ! ############################################################################### ! ##################### ! # Parameters describing how and where to execute the build. ! # Typical users need only update the following properties: ! # baseLocation - where things you are building against are installed ! # bootclasspath - The base jars to compile against (typicaly rt.jar) ! # configs - the list of {os, ws, arch} configurations to build. ! # ! # Of course any of the settings here can be overridden by spec'ing ! # them on the command line (e.g., -DbaseLocation=d:/eclipse ! ! ############# CVS CONTROL ################ ! # The CVS tag to use when fetching the map files from the repository ! ! mapVersionTag=HEAD ! ! # The CVS tag to use when fetching elements to build. By default the ! # builder will use whatever is in the maps. Use this value to override ! # for example, when doing a nightly build out of HEAD ! ! fetchTag=HEAD ! ############## BUILD / GENERATION CONTROL ################ ! # The directory into which the build elements will be fetched and where ! # the build will take place. ! # Do not enter relative paths, because otherwise the directory.txt file ! # won't be found ! # If relative , the directory would be relative to the $builder directory ! #buildDirectory=D:\\Temp\\buildresult3 ! ! # Type of build. Used in naming the build output. Typically this value is ! # one of I, N, M, S, ... ! # If you change this, please also see the featureVersion and baseFeatureVersion properties below ! buildType=N ! ! # ID of the build. Used in naming the build output. (the zip file) ! # buildId is set in customTargets.xml in order to consider a dynamic featureVersion for nightlyBuild ! #buildId=${featureVersion} ! ! # Label for the build. Used in naming the build output (the directory) ! # buildLabel is set in customTargets.xml in order to consider a dynamic featureVersion for nightlyBuild ! #buildLabel=${featureVersion} ! ! # Timestamp for the build. Used in naming the build output ! #timestamp=007 ! ! # Base location for anything the build needs to compile against. For example, ! # when building GEF, the baseLocation should be the location of a previously ! # installed Eclipse against which the GEF code will be compiled. ! #baseLocation=D:\\eclipse-3.0 ! ! #Os/Ws/Arch/nl of the eclipse specified by baseLocation ! #baseos ! #basews ! #basearch ! #basenl ! ! # The location underwhich all of the build output will be collected. ! # This is a subdirectory of $buildDirectory ! # Set collectingFolder and archivePrefix to . if you want to create archives without ! # trailing eclipse in the paths of the included files ! collectingFolder=. ! ! # The prefix that will be used in the generated archive. ! # Does not make sense to use a different archivePrefix than collectingFolder, ! # because zip wouldn't find any files to include into the target zip otherwise ! archivePrefix=. ! ! # The list of {os, ws, arch} configurations to build. This ! # value is a '&' separated list of ',' separate triples. For example, ! # configs=win32,win32,x86 & linux,motif,x86 ! # By default the value is *,*,* ! #configs=*,*,* ! ! #Arguments to send to the zip executable ! # Doesn't work ! #zipArgs=-z "RDT: extract into eclipse-installation directory" ! ! ############# JAVA COMPILER OPTIONS ############## ! # The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE ! #bootclasspath=d:/ibm1.3.1/jre/lib/rt.jar ! #bootclasspath=D:\\java\\j2sdk1.4.2_05\\jre\\lib\\rt.jar ! ! # Whether or not to include debug info in the output jars ! javacDebugInfo=false ! ! # Whether or not to fail the build if there are compiler errors ! javacFailOnError=true ! ! # The version of the source code ! #javaSource=1.3 ! ! # The version of the byte code targeted ! #javacTarget=1.1 ! ! #collPlace=eclipse ! #collBase=. ! #collectingFolder=eclipse ! #archivePrefix=eclipse ! ! # Depending on the build type, define either baseFeatureVersion or featureVersion ! # A) Nightly Build ! # In the case of a nightly build the property featureVersion will be created in ! # customTargets.xml. It will include a timestamp in the minor version number. ! # The baseFeatureVersion must be set, because it is used to replace the version in the ! # feature.xml files of the rdt feature.xml and the test feature.xml with the created featureVersion ! baseFeatureVersion=0.6.0 ! ! # B) Every other Build type ! # featureVersion is used for setting the version of org.rubypeople.rdt.doc.user/plugin.xml ! # and for calling the appropriate test suite in customTargets.xml ! # ! #featureVersion=0.6.0 ! ! # if the buildType is N a property featureVersion will be created in ! # customTargets.xml. The featureVersion consists of the nightlyBuildFeatureVersionPrefix ! # concatenated with a timestamp in the format yyyyMMddhhmm ! nightlyBuildFeatureVersionPrefix=0.6. \ No newline at end of file |
|
From: Markus B. <mba...@us...> - 2005-03-27 11:32:47
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.build/bootstrap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2479/bootstrap Modified Files: customTargets.xml Log Message: added updatesite and dynamic versioning for nightly build, formatted Index: customTargets.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.build/bootstrap/customTargets.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** customTargets.xml 26 Mar 2005 06:42:40 -0000 1.6 --- customTargets.xml 27 Mar 2005 11:32:38 -0000 1.7 *************** *** 1,229 **** <project name="Build specific targets and properties" default="noDefault" > ! ! <!-- ===================================================================== --> ! <!-- Run a given ${target} on all elements being built --> ! <!-- Add on <ant> task for each top level element being built. --> ! <!-- ===================================================================== --> ! <target name="allElements"> ! ! <ant antfile="${genericTargets}" target="${target}" > ! <property name="type" value="feature" /> ! <property name="id" value="org.rubypeople.rdt" /> ! </ant> ! ! <ant antfile="${genericTargets}" target="${target}" > ! <property name="type" value="feature" /> ! <property name="id" value="org.rubypeople.rdt-tests" /> ! </ant> ! </target> ! ! <!-- ===================================================================== --> ! <!-- Targets to assemble the built elements for particular configurations --> ! <!-- These generally call the generated assemble scripts (named in --> ! <!-- ${assembleScriptName}) but may also add pre and post processing --> ! <!-- Add one target for each root element and each configuration --> ! <!-- ===================================================================== --> ! ! <target name="assemble.org.rubypeople.rdt"> ! <ant antfile="${assembleScriptName}" dir="${buildDirectory}"> ! <property name="zipargs" value="" /> ! </ant> ! </target> ! ! <target name="assemble.org.rubypeople.rdt-tests"> ! <ant antfile="${assembleScriptName}" dir="${buildDirectory}"> ! <property name="zipargs" value="" /> ! </ant> ! </target> ! ! <!-- ===================================================================== --> ! <!-- Check out map files from correct repository --> ! <!-- Replace values for cvsRoot, package and mapVersionTag as desired. --> ! <!-- ===================================================================== --> ! <target name="getMapFiles"> ! <property name="mapVersionTag" value="HEAD" /> ! <antcall target="getMapFilesWithExtMethod"/> ! <antcall target="getMapFilesWithPserverMethod"/> ! </target> ! ! <target name="getMapFilesWithExtMethod" unless="usePserver"> ! <property name="cvsRoot" value=":ext:cvs.sf.net:/cvsroot/rubyeclipse" /> ! <cvs ! cvsroot="${cvsRoot}" ! dest="${buildDirectory}/maps" ! command="export -r ${mapVersionTag} org.rubypeople.rdt.build/map" ! /> ! ! </target> ! ! <target name="getMapFilesWithPserverMethod" if="usePserver"> ! <property name="cvsRoot" value=":pserver:ano...@cv...:/cvsroot/rubyeclipse" /> ! <cvs ! cvsroot="${cvsRoot}" ! dest="${buildDirectory}/maps" ! command="export -r ${mapVersionTag} org.rubypeople.rdt.build/map" ! /> ! <replace dir="${buildDirectory}/maps" value=":pserver:anonymous@"> ! <include name="**/*.map"/> ! <replacetoken>:ext:</replacetoken> ! </replace> ! </target> ! ! <!-- ===================================================================== --> ! <!-- Steps to do before setup --> ! <!-- ===================================================================== --> ! <target name="preSetup"> ! </target> ! ! <!-- ===================================================================== --> ! <!-- Steps to do after setup but before starting the build proper --> ! <!-- ===================================================================== --> ! <target name="postSetup"> ! </target> ! ! <!-- ===================================================================== --> ! <!-- Steps to do before fetching the build elements --> ! <!-- ===================================================================== --> ! <target name="preFetch"> ! </target> ! ! <!-- ===================================================================== --> ! <!-- Steps to do after fetching the build elements --> ! <!-- ===================================================================== --> ! <target name="postFetch"> ! <replace file="${buildDirectory}/features/org.rubypeople.rdt/feature.xml"> ! <replacefilter token="CLOSE_XML_COMMENT" value="-->" /> ! <replacefilter token="START_XML_COMMENT" value="<!--" /> ! </replace> ! ! <replace file="${buildDirectory}/features/org.rubypeople.rdt/build.properties"> ! <replacefilter token="#generate.feature" value="generate.feature" /> ! </replace> ! ! <replace dir="${buildDirectory}/plugins"> ! <include name="org.rubypeople.rdt.*/plugin.xml"/> ! <replacefilter token="${featureVersion}" value="0.5.503260628" /> ! </replace> ! </target> ! ! <!-- ===================================================================== --> ! <!-- Steps to do before generating the build scripts. --> ! <!-- ===================================================================== --> ! <target name="preGenerate"> ! </target> ! ! <!-- ===================================================================== --> ! <!-- Steps to do after generating the build scripts. --> ! <!-- ===================================================================== --> ! <target name="postGenerate"> ! </target> ! ! ! <!-- ===================================================================== --> ! <!-- Steps to do before running the build.xmls for the elements being built. --> ! <!-- ===================================================================== --> ! <target name="preProcess"> ! </target> ! ! <!-- ===================================================================== --> ! <!-- Steps to do after running the build.xmls for the elements being built. --> ! <!-- ===================================================================== --> ! <target name="postProcess"> ! </target> ! ! ! <!-- ===================================================================== --> ! <!-- Steps to do before running assemble. --> ! <!-- ===================================================================== --> ! <target name="preAssemble"> ! </target> ! ! <!-- ===================================================================== --> ! <!-- Steps to do after running assemble. --> ! <!-- ===================================================================== --> ! <target name="postAssemble"> ! </target> ! ! <!-- ===================================================================== --> ! <!-- Steps to do after the build is done. --> ! <!-- ===================================================================== --> ! <target name="postBuild"> ! <antcall target="test"/> ! <property name="UpdateSiteStagingLocation" value="${buildDirectory}/updateSite"/> ! <property name="sitePackagePrefix" value="org.rubypeople.updatesite"/> ! <antcall target="generateUpdateSite"/> ! </target> ! ! <!-- ===================================================================== --> ! <!-- Steps to test the build results --> ! <!-- ===================================================================== --> ! <target name="test" unless="dontRunTests"> ! <echo message="Setting up tests in ${eclipseAutomatedTestHome}"/> ! ! <copy file="${buildDirectory}/${buildLabel}/org.rubypeople.rdt-${buildId}.zip" tofile="${eclipseAutomatedTestHome}/eclipse-SDK-RDT-${buildId}.zip" /> ! <copy file="${buildDirectory}/${buildLabel}/org.rubypeople.rdt-tests-${buildId}.zip" tofile="${eclipseAutomatedTestHome}/eclipse-junit-tests-rdt-${buildId}.zip" /> ! ! <ant antfile="${eclipseAutomatedTestHome}/test.xml" target="runtests" dir="${eclipseAutomatedTestHome}"> ! <property name="os" value="${baseos}" /> ! <property name="ws" value="${basews}" /> ! <property name="arch" value="${basearch}" /> ! <property name="testPlugin" value="org.rubypeople.rdt.tests.all_0.5.0" /> ! <property name="report" value="org.rubypeople.rdt.tests.all" /> ! </ant> ! ! </target> ! ! <!--======================================================--> ! <!-- UpdateSite Export target --> ! <!-- ==================================================== --> ! <target name="updateSiteExport"> ! <ant antfile="build.xml" dir="${buildDirectory}/features/${id}/" target="build.update.jar"> ! <property name="feature.destination" value="${UpdateSiteStagingLocation}/features"/> ! <property name="plugin.destination" value="${UpdateSiteStagingLocation}/plugins"/> ! </ant> ! </target> ! ! ! <target name="generateUpdateSite"> ! <!-- Create the directory structure --> ! <mkdir dir="${UpdateSiteStagingLocation}"/> ! <mkdir dir="${UpdateSiteStagingLocation}/features"/> ! <mkdir dir="${UpdateSiteStagingLocation}/plugins"/> ! ! <!-- Build the jar files --> ! <antcall target="allElements"> ! <param name="genericTargets" value="${builder}/customTargets.xml"/> ! <param name="target" value="updateSiteExport"/> ! </antcall> ! ! <!-- Grab the rest of the site out of CVS --> ! <mkdir dir="${buildDirectory}/temp.updatesite"/> ! <property name="cvsRoot" value=":ext:cvs.sf.net:/cvsroot/rubyeclipse" /> ! ! <cvs cvsRoot="${cvsRoot}" ! package="${sitePackagePrefix}" ! dest="${buildDirectory}/temp.updatesite" ! tag="HEAD"/> ! ! <!-- Copy to staging area --> ! <copy todir="${UpdateSiteStagingLocation}"> ! <fileset file="${buildDirectory}/temp.updatesite/${sitePackagePrefix}/site.xml"/> ! </copy> ! ! <delete dir="${buildDirectory}/temp.updatesite"/> ! </target> ! ! <!-- ===================================================================== --> ! <!-- Steps to do to publish the build results --> ! <!-- ===================================================================== --> ! <target name="publish"> ! </target> ! ! <!-- ===================================================================== --> ! <!-- Default target --> ! <!-- ===================================================================== --> ! <target name="noDefault"> ! <echo message="You must specify a target when invoking this file" /> ! </target> ! ! </project> --- 1,215 ---- <project name="Build specific targets and properties" default="noDefault" > ! <condition property="isNightlyBuild"> ! <equals arg1="${buildType}" arg2="N"/> ! </condition> ! <property file="${buildDirectory}/version.properties"/> ! <property name="buildLabel" value="${buildType}-${featureVersion}"/> ! <property name="buildId" value="${featureVersion}"/> ! <!-- ===================================================================== --> ! <!-- Run a given ${target} on all elements being built --> ! <!-- Add on <ant> task for each top level element being built. --> ! <!-- ===================================================================== --> ! <target name="allElements"> ! <ant antfile="${genericTargets}" target="${target}" > ! <property name="type" value="feature" /> ! <property name="id" value="org.rubypeople.rdt" /> ! </ant> ! <ant antfile="${genericTargets}" target="${target}" > ! <property name="type" value="feature" /> ! <property name="id" value="org.rubypeople.rdt-tests" /> ! </ant> ! </target> ! <!-- ===================================================================== --> ! <!-- Targets to assemble the built elements for particular configurations --> ! <!-- These generally call the generated assemble scripts (named in --> ! <!-- ${assembleScriptName}) but may also add pre and post processing --> ! <!-- Add one target for each root element and each configuration --> ! <!-- ===================================================================== --> ! <target name="assemble.org.rubypeople.rdt"> ! <ant antfile="${assembleScriptName}" dir="${buildDirectory}"> ! <property name="zipargs" value="" /> ! </ant> ! </target> ! <target name="assemble.org.rubypeople.rdt-tests"> ! <ant antfile="${assembleScriptName}" dir="${buildDirectory}"> ! <property name="zipargs" value="" /> ! </ant> ! </target> ! <!-- ===================================================================== --> ! <!-- Check out map files from correct repository --> ! <!-- Replace values for cvsRoot, package and mapVersionTag as desired. --> ! <!-- ===================================================================== --> ! <target name="getMapFiles"> ! <property name="mapVersionTag" value="HEAD" /> ! <antcall target="getMapFilesWithExtMethod"/> ! <antcall target="getMapFilesWithPserverMethod"/> ! </target> ! <target name="getMapFilesWithExtMethod" unless="usePserver"> ! <property name="cvsRoot" value=":ext:cvs.sf.net:/cvsroot/rubyeclipse" /> ! <cvs cvsroot="${cvsRoot}" dest="${buildDirectory}/maps" command="export -r ${mapVersionTag} org.rubypeople.rdt.build/map" /> ! </target> ! <target name="getMapFilesWithPserverMethod" if="usePserver"> ! <property name="cvsRoot" value=":pserver:ano...@cv...:/cvsroot/rubyeclipse" /> ! <cvs cvsroot="${cvsRoot}" dest="${buildDirectory}/maps" command="export -r ${mapVersionTag} org.rubypeople.rdt.build/map" /> ! <replace dir="${buildDirectory}/maps" value=":pserver:anonymous@"> ! <include name="**/*.map"/> ! <replacetoken>:ext:</replacetoken> ! </replace> ! </target> ! <!-- ===================================================================== --> ! <!-- Steps to do before setup --> ! <!-- ===================================================================== --> ! <target name="preSetup" unless="featureVersion"> ! <tstamp> ! <!-- unfortunately one "y" in the pattern pads with 0, so 2005 will be displayed as 05 --> ! <format property="build.tstamp" pattern="5MMddhhmm"/> ! </tstamp> ! <condition property="featureVersion" value="${nightlyBuildFeatureVersionPrefix}${build.tstamp}"> ! <equals arg1="${buildType}" arg2="N"/> ! </condition> ! <fail unless="featureVersion" message="Property featureVersion must be set. Either directly or in case of a nightly build with nightlyBuildFeatureVersionPrefix."/> ! <echo message="Using featureVersion: ${featureVersion}."/> ! <echo file="${buildDirectory}/version.properties" message="featureVersion=${featureVersion}"/> ! </target> ! <!-- ===================================================================== --> ! <!-- Steps to do after setup but before starting the build proper --> ! <!-- ===================================================================== --> ! <target name="postSetup"> ! </target> ! <!-- ===================================================================== --> ! <!-- Steps to do before fetching the build elements --> ! <!-- ===================================================================== --> ! <target name="preFetch"> ! </target> ! <!-- ===================================================================== --> ! <!-- Steps to do after fetching the build elements --> ! <!-- ===================================================================== --> ! <target name="postFetch"> ! <antcall target="replaceVersionsForNightlyBuild"/> ! <replace file="${buildDirectory}/features/org.rubypeople.rdt/feature.xml"> ! <replacefilter token="<!--@@INCLUDES@@-->" value="<includes id="org.rubypeople.rdt.source" version="${featureVersion}"/>"/> ! </replace> ! <replace file="${buildDirectory}/features/org.rubypeople.rdt/build.properties"> ! <replacefilter token="#generate.feature" value="generate.feature" /> ! </replace> ! </target> ! <target name="replaceVersionsForNightlyBuild" if="baseFeatureVersion"> ! <replace dir="${buildDirectory}/features"> ! <include name="org.rubypeople.*/feature.xml"/> ! <replacefilter token="${baseFeatureVersion}" value="${featureVersion}" /> ! </replace> ! <replace dir="${buildDirectory}/plugins"> ! <include name="org.rubypeople.*/plugin.xml"/> ! <replacefilter token="${baseFeatureVersion}" value="${featureVersion}" /> ! </replace> ! </target> ! <!-- ===================================================================== --> ! <!-- Steps to do before generating the build scripts. --> ! <!-- ===================================================================== --> ! <target name="preGenerate"> ! <fail unless="featureVersion" message="Property featureVersion must be set. Either directly or in case of a nightly build with nightlyBuildFeatureVersionPrefix."/> ! </target> ! <!-- ===================================================================== --> ! <!-- Steps to do after generating the build scripts. --> ! <!-- ===================================================================== --> ! <target name="postGenerate"> ! </target> ! <!-- ===================================================================== --> ! <!-- Steps to do before running the build.xmls for the elements being built. --> ! <!-- ===================================================================== --> ! <target name="preProcess"> ! </target> ! <!-- ===================================================================== --> ! <!-- Steps to do after running the build.xmls for the elements being built. --> ! <!-- ===================================================================== --> ! <target name="postProcess"> ! </target> ! <!-- ===================================================================== --> ! <!-- Steps to do before running assemble. --> ! <!-- ===================================================================== --> ! <target name="preAssemble"> ! </target> ! <!-- ===================================================================== --> ! <!-- Steps to do after running assemble. --> ! <!-- ===================================================================== --> ! <target name="postAssemble"> ! </target> ! <!-- ===================================================================== --> ! <!-- Steps to do after the build is done. --> ! <!-- ===================================================================== --> ! <target name="postBuild"> ! <antcall target="test"/> ! <property name="UpdateSiteStagingLocation" value="${buildDirectory}/updateSite"/> ! <property name="sitePackagePrefix" value="org.rubypeople.updatesite"/> ! <antcall target="generateUpdateSite"/> ! </target> ! <!-- ===================================================================== --> ! <!-- Steps to test the build results --> ! <!-- ===================================================================== --> ! <target name="test" unless="dontRunTests"> ! <echo message="Setting up tests in ${eclipseAutomatedTestHome}"/> ! <copy file="${buildDirectory}/${buildLabel}/org.rubypeople.rdt-${buildId}.zip" tofile="${eclipseAutomatedTestHome}/eclipse-SDK-RDT-${buildId}.zip" /> ! <copy file="${buildDirectory}/${buildLabel}/org.rubypeople.rdt-tests-${buildId}.zip" tofile="${eclipseAutomatedTestHome}/eclipse-junit-tests-rdt-${buildId}.zip" /> ! <ant antfile="${eclipseAutomatedTestHome}/test.xml" target="runtests" dir="${eclipseAutomatedTestHome}"> ! <property name="os" value="${baseos}" /> ! <property name="ws" value="${basews}" /> ! <property name="arch" value="${basearch}" /> ! <property name="testPlugin" value="org.rubypeople.rdt.tests.all_${featureVersion}" /> ! <property name="report" value="org.rubypeople.rdt.tests.all" /> ! </ant> ! </target> ! <!--======================================================--> ! <!-- UpdateSite Export target --> ! <!-- ==================================================== --> ! <target name="updateSiteExport"> ! <ant antfile="build.xml" dir="${buildDirectory}/features/${id}/" target="build.update.jar"> ! <property name="feature.destination" value="${UpdateSiteStagingLocation}/features"/> ! <property name="plugin.destination" value="${UpdateSiteStagingLocation}/plugins"/> ! </ant> ! </target> ! <target name="generateUpdateSite"> ! <!-- Create the directory structure --> ! <mkdir dir="${UpdateSiteStagingLocation}"/> ! <mkdir dir="${UpdateSiteStagingLocation}/features"/> ! <mkdir dir="${UpdateSiteStagingLocation}/plugins"/> ! <!-- Build the jar files --> ! <antcall target="allElements"> ! <param name="genericTargets" value="${builder}/customTargets.xml"/> ! <param name="target" value="updateSiteExport"/> ! </antcall> ! <antcall target="copySiteXmlFromCvs"/> ! <antcall target="createNightlyBuildSiteXml"/> ! <delete dir="${buildDirectory}/temp.updatesite"/> ! </target> ! <target name="copySiteXmlFromCvs" unless="isNightlyBuild"> ! <!-- Grab the rest of the site out of CVS --> ! <mkdir dir="${buildDirectory}/temp.updatesite"/> ! <property name="cvsRoot" value=":ext:cvs.sf.net:/cvsroot/rubyeclipse" /> ! <cvs cvsRoot="${cvsRoot}" package="${sitePackagePrefix}" dest="${buildDirectory}/temp.updatesite" tag="HEAD"/> ! <!-- Copy to staging area --> ! <copy todir="${UpdateSiteStagingLocation}"> ! <fileset file="${buildDirectory}/temp.updatesite/${sitePackagePrefix}/site.xml"/> ! </copy> ! </target> ! <target name="createNightlyBuildSiteXml" if="isNightlyBuild"> ! <echo file="${UpdateSiteStagingLocation}/site.xml"><?xml version="1.0" encoding="UTF-8"?> ! <site> ! <description url="http://rubyeclipse.sourceforge.net/updatesite/nightly/"> The Ruby Development ! Tools update site. </description> ! <feature url="features/org.rubypeople.rdt_${featureVersion}.jar" id="org.rubypeople.rdt" version="${featureVersion}"> <category ! name="RubyEclipseNightlyBuild"/> </feature> ! <category-def name="RubyEclipseNightlyBuild" label="RDT Nigthly Build"> </category-def> </site> ! </echo> ! </target> ! <!-- ===================================================================== --> ! <!-- Steps to do to publish the build results --> ! <!-- ===================================================================== --> ! <target name="publish"> ! </target> ! <!-- ===================================================================== --> ! <!-- Default target --> ! <!-- ===================================================================== --> ! <target name="noDefault"> ! <echo message="You must specify a target when invoking this file" /> ! </target> ! </project> \ No newline at end of file |