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: <jas...@us...> - 2006-06-21 04:55:00
|
Revision: 1477 Author: jasonpmorrison Date: 2006-06-20 21:54:53 -0700 (Tue, 20 Jun 2006) ViewCVS: http://svn.sourceforge.net/rubyeclipse/?rev=1477&view=rev Log Message: ----------- Infers LocalVarNode references by backsearching for an assignment. More tests, more code to cover them. - Assigning to another local variable. Modified Paths: -------------- branches/type_inferrence/trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/ti/TypeInferrerTest.java This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <jas...@us...> - 2006-06-21 03:33:24
|
Revision: 1476 Author: jasonpmorrison Date: 2006-06-20 20:33:15 -0700 (Tue, 20 Jun 2006) ViewCVS: http://svn.sourceforge.net/rubyeclipse/?rev=1476&view=rev Log Message: ----------- NodeLocator finds the most closely spanning node for a given root node and source offset. Added Paths: ----------- branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/util/NodeLocator.java This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <jas...@us...> - 2006-06-21 03:33:12
|
Revision: 1475 Author: jasonpmorrison Date: 2006-06-20 20:33:05 -0700 (Tue, 20 Jun 2006) ViewCVS: http://svn.sourceforge.net/rubyeclipse/?rev=1475&view=rev Log Message: ----------- NodeLocator finds the most closely spanning node for a given root node and source offset. Added Paths: ----------- branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/util/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <jas...@us...> - 2006-06-21 03:27:25
|
Revision: 1474 Author: jasonpmorrison Date: 2006-06-20 20:27:18 -0700 (Tue, 20 Jun 2006) ViewCVS: http://svn.sourceforge.net/rubyeclipse/?rev=1474&view=rev Log Message: ----------- Ported in code from TypeInferenceVisitor to pass tests: - Fixnum - String - Fixnum Assignment Modified Paths: -------------- branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/DefaultTypeInferrer.java This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <jas...@us...> - 2006-06-21 03:26:22
|
Revision: 1473 Author: jasonpmorrison Date: 2006-06-20 20:26:15 -0700 (Tue, 20 Jun 2006) ViewCVS: http://svn.sourceforge.net/rubyeclipse/?rev=1473&view=rev Log Message: ----------- Cleaned up built-in ruby types Modified Paths: -------------- branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/data/ConstNodeTypeNames.java This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <jas...@us...> - 2006-06-21 03:25:55
|
Revision: 1472 Author: jasonpmorrison Date: 2006-06-20 20:25:47 -0700 (Tue, 20 Jun 2006) ViewCVS: http://svn.sourceforge.net/rubyeclipse/?rev=1472&view=rev Log Message: ----------- bad hack? quick fix? not sure at the moment... Modified Paths: -------------- branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScript.java This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <jas...@us...> - 2006-06-21 02:00:37
|
Revision: 1471 Author: jasonpmorrison Date: 2006-06-20 18:56:48 -0700 (Tue, 20 Jun 2006) ViewCVS: http://svn.sourceforge.net/rubyeclipse/?rev=1471&view=rev Log Message: ----------- Replaced older JRuby jar with latest from head to fix positioning errors Added Paths: ----------- branches/type_inferrence/trunk/org.rubypeople.rdt.core/lib/jruby-head-20060620.jar branches/type_inferrence/trunk/org.rubypeople.rdt.core/lib/jruby.jar-old Removed Paths: ------------- branches/type_inferrence/trunk/org.rubypeople.rdt.core/lib/jruby.jar This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <caw...@us...> - 2006-06-21 01:35:21
|
Revision: 1470 Author: cawilliams Date: 2006-06-20 18:35:17 -0700 (Tue, 20 Jun 2006) ViewCVS: http://svn.sourceforge.net/rubyeclipse/?rev=1470&view=rev Log Message: ----------- add some more task markers for code feedback (inline so hopefully it makes more sense) Modified Paths: -------------- branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/Scope.java This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <caw...@us...> - 2006-06-21 01:31:07
|
Revision: 1469 Author: cawilliams Date: 2006-06-20 18:31:03 -0700 (Tue, 20 Jun 2006) ViewCVS: http://svn.sourceforge.net/rubyeclipse/?rev=1469&view=rev Log Message: ----------- add some more task markers for code feedback (inline so hopefully it makes more sense) Modified Paths: -------------- branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/Variable.java This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <caw...@us...> - 2006-06-21 01:27:44
|
Revision: 1468 Author: cawilliams Date: 2006-06-20 18:27:40 -0700 (Tue, 20 Jun 2006) ViewCVS: http://svn.sourceforge.net/rubyeclipse/?rev=1468&view=rev Log Message: ----------- create an instance of the DefaultTypeInferrer for the test case Modified Paths: -------------- branches/type_inferrence/trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/ti/TypeInferrerTest.java This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <caw...@us...> - 2006-06-21 01:26:54
|
Revision: 1467 Author: cawilliams Date: 2006-06-20 18:26:41 -0700 (Tue, 20 Jun 2006) ViewCVS: http://svn.sourceforge.net/rubyeclipse/?rev=1467&view=rev Log Message: ----------- add a note to suggest an API change - getTypeGuesses isn't really needed yet Modified Paths: -------------- branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/Variable.java This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <caw...@us...> - 2006-06-21 01:25:57
|
Revision: 1466 Author: cawilliams Date: 2006-06-20 18:25:54 -0700 (Tue, 20 Jun 2006) ViewCVS: http://svn.sourceforge.net/rubyeclipse/?rev=1466&view=rev Log Message: ----------- add a default stub of an implementation for ITypeInferrer - can't fully implement because there's currently no way to get ITypeGuesses out of TypeInferrenceVisitor (and TypeInferrenceVisitor also needs to match an offset to a particular node). Added Paths: ----------- branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/DefaultTypeInferrer.java This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <caw...@us...> - 2006-06-21 01:24:31
|
Revision: 1465 Author: cawilliams Date: 2006-06-20 18:24:18 -0700 (Tue, 20 Jun 2006) ViewCVS: http://svn.sourceforge.net/rubyeclipse/?rev=1465&view=rev Log Message: ----------- add an easier method for parsing straight from a string Modified Paths: -------------- branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RubyParser.java This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: Markus B. <mba...@us...> - 2006-06-18 17:18:03
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.build/cruiseControl In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22624 Modified Files: build-RDT.properties build.properties Added Files: startCCForRDT.sh Log Message: small changes for cc 2.5 Index: build-RDT.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.build/cruiseControl/build-RDT.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** build-RDT.properties 8 Jan 2006 15:19:49 -0000 1.3 --- build-RDT.properties 18 Jun 2006 17:17:57 -0000 1.4 *************** *** 1,13 **** ! rdtBuildHome=/home/bma # buildDirectory is the directory into which the source are checked out and # where the build takes place buildDirectory=${rdtBuildHome}/cruiseControlWorkspace/checkout/RDT ! # the eclipse instance used for build ! eclipseDir=${rdtBuildHome}/eclipse/eclipse-3.1 # the pdeBuildPluginVersion is needed in order to construct the directory # where the pde build scripts are located ! pdeBuildPluginVersion=3.1.0 buildfile=${eclipseDir}/plugins/org.eclipse.pde.build_${pdeBuildPluginVersion}/scripts/build.xml --- 1,13 ---- ! rdtBuildHome=/home/rdt # buildDirectory is the directory into which the source are checked out and # where the build takes place buildDirectory=${rdtBuildHome}/cruiseControlWorkspace/checkout/RDT ! # the eclipse instance used for building ! eclipseDir=${rdtBuildHome}/eclipse/eclipse-3.2RC7 # the pdeBuildPluginVersion is needed in order to construct the directory # where the pde build scripts are located ! pdeBuildPluginVersion=3.2.0.v20060601 buildfile=${eclipseDir}/plugins/org.eclipse.pde.build_${pdeBuildPluginVersion}/scripts/build.xml --- NEW FILE: startCCForRDT.sh --- #! /bin/sh Xvfb :1 & export DISPLAY=localhost:1 #cd ~/cruisecontrol-bin-2.5 sh ../cruisecontrol-bin-2.5/cruisecontrol.sh -webport 8090 $@ Index: build.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.build/cruiseControl/build.properties,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** build.properties 14 Apr 2006 01:21:13 -0000 1.4 --- build.properties 18 Jun 2006 17:17:57 -0000 1.5 *************** *** 100,104 **** # The version of the byte code targeted ! #javacTarget=1.1 #collPlace=eclipse --- 100,104 ---- # The version of the byte code targeted ! javacTarget=1.4 #collPlace=eclipse |
|
From: Markus B. <mba...@us...> - 2006-06-18 17:17:09
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.build/cruiseControl/plugin In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22178 Added Files: build.xml Log Message: build --- NEW FILE: build.xml --- <project basedir="." default="compile" name="JRuby"> <description> </description> <property name="cruisecontrol.home" value="../../cruisecontrol-bin-2.5"/> <property name="cruisecontrol.libs" value="${cruisecontrol.home}/lib"/> <property name="dest.dir" value="bin"/> <path id="build.classpath"> <fileset dir="${cruisecontrol.libs}" includes="*.jar"/> </path> <target name="compile"> <mkdir dir="${dest.dir}"/> <javac destdir="${dest.dir}" debug="true"> <classpath refid="build.classpath"/> <src path="src"/> </javac> </target> <target name="deploy" depends="compile"> <copy todir="${cruisecontrol.home}"> <fileset dir="${dest.dir}"/> </copy> </target> </project> |
|
From: Christopher W. <caw...@us...> - 2006-06-09 01:19:23
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/text/folding In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7890/src/org/rubypeople/rdt/ui/text/folding Added Files: IRubyFoldingStructureProviderExtension.java Log Message: Add a folding action menu to context ruler on left side of editor, and add command shortcuts for actions to manipulatae folding. Now users can collapse/expand all, comments, members, reset structure, etc. --- NEW FILE: IRubyFoldingStructureProviderExtension.java --- /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.rubypeople.rdt.ui.text.folding; import org.rubypeople.rdt.core.IRubyElement; /** * Extends {@link IRubyFoldingStructureProvider} with the following * functions: * <ul> * <li>collapsing of comments and members</li> * <li>expanding and collapsing of certain ruby elements</li> * </ul> * * @since 0.9.0 */ public interface IRubyFoldingStructureProviderExtension { /** * Collapses all members except for top level types. */ void collapseMembers(); /** * Collapses all comments. */ void collapseComments(); /** * Collapses the given elements. * * @param elements the ruby elements to collapse (the array and its elements will not be * modified) */ void collapseElements(IRubyElement[] elements); /** * Expands the given elements. * * @param elements the ruby elements to expand (the array and its elements will not be modified) */ void expandElements(IRubyElement[] elements); } |
|
From: Christopher W. <caw...@us...> - 2006-06-09 01:19:23
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7890/src/org/rubypeople/rdt/internal/ui/actions Added Files: FoldingMessages.java FoldingMessages.properties FoldingActionGroup.java Log Message: Add a folding action menu to context ruler on left side of editor, and add command shortcuts for actions to manipulatae folding. Now users can collapse/expand all, comments, members, reset structure, etc. --- NEW FILE: FoldingMessages.java --- /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.rubypeople.rdt.internal.ui.actions; import java.text.MessageFormat; import java.util.MissingResourceException; import java.util.ResourceBundle; /** * Class that gives access to the folding messages resource bundle. */ public class FoldingMessages { private static final String BUNDLE_NAME= "org.rubypeople.rdt.internal.ui.actions.FoldingMessages"; //$NON-NLS-1$ private static final ResourceBundle RESOURCE_BUNDLE= ResourceBundle.getBundle(BUNDLE_NAME); private FoldingMessages() { // no instance } /** * Returns the resource string associated with the given key in the resource bundle. If there isn't * any value under the given key, the key is returned. * * @param key the resource key * @return the string */ public static String getString(String key) { try { return RESOURCE_BUNDLE.getString(key); } catch (MissingResourceException e) { return '!' + key + '!'; } } /** * Returns the resource bundle managed by the receiver. * * @return the resource bundle * @since 3.0 */ public static ResourceBundle getResourceBundle() { return RESOURCE_BUNDLE; } /** * Returns the formatted resource string associated with the given key in the resource bundle. * <code>MessageFormat</code> is used to format the message. If there isn't any value * under the given key, the key is returned. * * @param key the resource key * @param arg the message argument * @return the string */ public static String getFormattedString(String key, Object arg) { return getFormattedString(key, new Object[] { arg }); } /** * Returns the formatted resource string associated with the given key in the resource bundle. * <code>MessageFormat</code> is used to format the message. If there isn't any value * under the given key, the key is returned. * * @param key the resource key * @param args the message arguments * @return the string */ public static String getFormattedString(String key, Object[] args) { return MessageFormat.format(getString(key), args); } } --- NEW FILE: FoldingMessages.properties --- Projection.Toggle.label= &Enable Folding Projection.Toggle.tooltip= Toggles Folding Projection.Toggle.description= Toggles folding for the current editor Projection.Toggle.image= Projection.ExpandAll.label= Expand &All Projection.ExpandAll.tooltip= Expands All Collapsed Regions Projection.ExpandAll.description= Expands any collapsed regions in the current editor Projection.ExpandAll.image= Projection.Expand.label= E&xpand Projection.Expand.tooltip= Expands the Current Collapsed Region Projection.Expand.description= Expands the collapsed region at the current selection Projection.Expand.image= Projection.CollapseAll.label= Collapse A&ll Projection.CollapseAll.tooltip= Collapses All Expanded Regions Projection.CollapseAll.description= Collapse any expanded regions in the current editor Projection.CollapseAll.image= Projection.Collapse.label= Colla&pse Projection.Collapse.tooltip= Collapses the Current Region Projection.Collapse.description= Collapses the Current Region Projection.Collapse.image= Projection.Restore.label= &Reset Structure Projection.Restore.tooltip= Restore the Original Folding Structure Projection.Restore.description= Restores the original folding structure Projection.Restore.image= Projection.CollapseComments.label= Collapse &Comments Projection.CollapseComments.tooltip= Collapses All Comments Projection.CollapseComments.description= Collapses all comments Projection.CollapseComments.image= Projection.CollapseMembers.label= Collapse &Members Projection.CollapseMembers.tooltip= Collapses All Members Projection.CollapseMembers.description= Collapses all members Projection.CollapseMembers.image= --- NEW FILE: FoldingActionGroup.java --- /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.rubypeople.rdt.internal.ui.actions; import java.util.ResourceBundle; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.text.ITextOperationTarget; import org.eclipse.jface.text.ITextViewer; import org.eclipse.jface.text.source.projection.IProjectionListener; import org.eclipse.jface.text.source.projection.ProjectionViewer; import org.eclipse.ui.actions.ActionGroup; import org.eclipse.ui.editors.text.IFoldingCommandIds; import org.eclipse.ui.texteditor.ITextEditor; import org.eclipse.ui.texteditor.IUpdate; import org.eclipse.ui.texteditor.ResourceAction; import org.eclipse.ui.texteditor.TextOperationAction; import org.rubypeople.rdt.internal.ui.RubyPlugin; import org.rubypeople.rdt.internal.ui.rubyeditor.RubyEditor; import org.rubypeople.rdt.ui.PreferenceConstants; import org.rubypeople.rdt.ui.actions.IRubyEditorActionDefinitionIds; /** * Groups the RDT folding actions. * * @since 0.9.0 */ public class FoldingActionGroup extends ActionGroup { private static abstract class PreferenceAction extends ResourceAction implements IUpdate { PreferenceAction(ResourceBundle bundle, String prefix, int style) { super(bundle, prefix, style); } } /** * @since 0.9.0 */ private class FoldingAction extends PreferenceAction { FoldingAction(ResourceBundle bundle, String prefix) { super(bundle, prefix, IAction.AS_PUSH_BUTTON); } public void update() { setEnabled(FoldingActionGroup.this.isEnabled() && fViewer.isProjectionMode()); } } private ProjectionViewer fViewer; private final PreferenceAction fToggle; private final TextOperationAction fExpand; private final TextOperationAction fCollapse; private final TextOperationAction fExpandAll; /* since 3.2 */ private final PreferenceAction fRestoreDefaults; private final FoldingAction fCollapseMembers; private final FoldingAction fCollapseComments; private final TextOperationAction fCollapseAll; private final IProjectionListener fProjectionListener; /** * Creates a new projection action group for <code>editor</code>. If the * supplied viewer is not an instance of <code>ProjectionViewer</code>, the * action group is disabled. * * @param editor the text editor to operate on * @param viewer the viewer of the editor */ public FoldingActionGroup(final ITextEditor editor, ITextViewer viewer) { if (!(viewer instanceof ProjectionViewer)) { fToggle= null; fExpand= null; fCollapse= null; fExpandAll= null; fCollapseAll= null; fRestoreDefaults= null; fCollapseMembers= null; fCollapseComments= null; fProjectionListener= null; return; } fViewer= (ProjectionViewer) viewer; fProjectionListener= new IProjectionListener() { public void projectionEnabled() { update(); } public void projectionDisabled() { update(); } }; fViewer.addProjectionListener(fProjectionListener); fToggle= new PreferenceAction(FoldingMessages.getResourceBundle(), "Projection.Toggle.", IAction.AS_CHECK_BOX) { //$NON-NLS-1$ public void run() { IPreferenceStore store= RubyPlugin.getDefault().getPreferenceStore(); boolean current= store.getBoolean(PreferenceConstants.EDITOR_FOLDING_ENABLED); store.setValue(PreferenceConstants.EDITOR_FOLDING_ENABLED, !current); } public void update() { ITextOperationTarget target= (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class); boolean isEnabled= (target != null && target.canDoOperation(ProjectionViewer.TOGGLE)); setEnabled(isEnabled); } }; fToggle.setChecked(true); fToggle.setActionDefinitionId(IFoldingCommandIds.FOLDING_TOGGLE); editor.setAction("FoldingToggle", fToggle); //$NON-NLS-1$ fExpandAll= new TextOperationAction(FoldingMessages.getResourceBundle(), "Projection.ExpandAll.", editor, ProjectionViewer.EXPAND_ALL, true); //$NON-NLS-1$ fExpandAll.setActionDefinitionId(IFoldingCommandIds.FOLDING_EXPAND_ALL); editor.setAction("FoldingExpandAll", fExpandAll); //$NON-NLS-1$ fCollapseAll= new TextOperationAction(FoldingMessages.getResourceBundle(), "Projection.CollapseAll.", editor, ProjectionViewer.COLLAPSE_ALL, true); //$NON-NLS-1$ fCollapseAll.setActionDefinitionId(IFoldingCommandIds.FOLDING_COLLAPSE_ALL); editor.setAction("FoldingCollapseAll", fCollapseAll); //$NON-NLS-1$ fExpand= new TextOperationAction(FoldingMessages.getResourceBundle(), "Projection.Expand.", editor, ProjectionViewer.EXPAND, true); //$NON-NLS-1$ fExpand.setActionDefinitionId(IFoldingCommandIds.FOLDING_EXPAND); editor.setAction("FoldingExpand", fExpand); //$NON-NLS-1$ fCollapse= new TextOperationAction(FoldingMessages.getResourceBundle(), "Projection.Collapse.", editor, ProjectionViewer.COLLAPSE, true); //$NON-NLS-1$ fCollapse.setActionDefinitionId(IFoldingCommandIds.FOLDING_COLLAPSE); editor.setAction("FoldingCollapse", fCollapse); //$NON-NLS-1$ fRestoreDefaults= new FoldingAction(FoldingMessages.getResourceBundle(), "Projection.Restore.") { //$NON-NLS-1$ public void run() { if (editor instanceof RubyEditor) { RubyEditor javaEditor= (RubyEditor) editor; javaEditor.resetProjection(); } } }; fRestoreDefaults.setActionDefinitionId(IFoldingCommandIds.FOLDING_RESTORE); editor.setAction("FoldingRestore", fRestoreDefaults); //$NON-NLS-1$ fCollapseMembers= new FoldingAction(FoldingMessages.getResourceBundle(), "Projection.CollapseMembers.") { //$NON-NLS-1$ public void run() { if (editor instanceof RubyEditor) { RubyEditor javaEditor= (RubyEditor) editor; javaEditor.collapseMembers(); } } }; fCollapseMembers.setActionDefinitionId(IRubyEditorActionDefinitionIds.FOLDING_COLLAPSE_MEMBERS); editor.setAction("FoldingCollapseMembers", fCollapseMembers); //$NON-NLS-1$ fCollapseComments= new FoldingAction(FoldingMessages.getResourceBundle(), "Projection.CollapseComments.") { //$NON-NLS-1$ public void run() { if (editor instanceof RubyEditor) { RubyEditor javaEditor= (RubyEditor) editor; javaEditor.collapseComments(); } } }; fCollapseComments.setActionDefinitionId(IRubyEditorActionDefinitionIds.FOLDING_COLLAPSE_COMMENTS); editor.setAction("FoldingCollapseComments", fCollapseComments); //$NON-NLS-1$ } /** * Returns <code>true</code> if the group is enabled. * <pre> * Invariant: isEnabled() <=> fViewer and all actions are != null. * </pre> * * @return <code>true</code> if the group is enabled */ protected boolean isEnabled() { return fViewer != null; } /* * @see org.eclipse.ui.actions.ActionGroup#dispose() */ public void dispose() { if (isEnabled()) { fViewer.removeProjectionListener(fProjectionListener); fViewer= null; } super.dispose(); } /** * Updates the actions. */ protected void update() { if (isEnabled()) { fToggle.update(); fToggle.setChecked(fViewer.isProjectionMode()); fExpand.update(); fExpandAll.update(); fCollapse.update(); fCollapseAll.update(); fRestoreDefaults.update(); fCollapseMembers.update(); fCollapseComments.update(); } } /** * Fills the menu with all folding actions. * * @param manager the menu manager for the folding submenu */ public void fillMenu(IMenuManager manager) { if (isEnabled()) { update(); manager.add(fToggle); manager.add(fExpandAll); manager.add(fExpand); manager.add(fCollapse); manager.add(fCollapseAll); manager.add(fRestoreDefaults); manager.add(fCollapseMembers); manager.add(fCollapseComments); } } /* * @see org.eclipse.ui.actions.ActionGroup#updateActionBars() */ public void updateActionBars() { update(); } } |
|
From: Christopher W. <caw...@us...> - 2006-06-09 01:19:22
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7890 Modified Files: plugin.properties plugin.xml Log Message: Add a folding action menu to context ruler on left side of editor, and add command shortcuts for actions to manipulatae folding. Now users can collapse/expand all, comments, members, reset structure, etc. Index: plugin.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/plugin.properties,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** plugin.properties 17 May 2006 02:43:37 -0000 1.36 --- plugin.properties 9 Jun 2006 01:19:17 -0000 1.37 *************** *** 113,116 **** --- 113,123 ---- ActionDefinition.gotoMatchingBracket.description= Surround the selected text with a begin/rescue block + #--- commands not assigned to a menu + ActionDefinition.foldingCollapseMembers.name= Collapse Members + ActionDefinition.foldingCollapseMembers.description= Collapse all members + + ActionDefinition.foldingCollapseComments.name= Collapse Comments + ActionDefinition.foldingCollapseComments.description= Collapse all comments + scope.rubyEditor.name=Ruby Editor scope.rubyEditor.description=Ruby Editor Index: plugin.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/plugin.xml,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** plugin.xml 17 May 2006 02:43:37 -0000 1.84 --- plugin.xml 9 Jun 2006 01:19:17 -0000 1.85 *************** *** 525,528 **** --- 525,540 ---- categoryId="org.rubypeople.rdt.ui.category.source" id="org.rubypeople.rdt.ui.edit.text.ruby.toggle.comment "> + </command> + <command + name="%ActionDefinition.foldingCollapseMembers.name" + description="%ActionDefinition.foldingCollapseMembers.description" + categoryId="org.eclipse.ui.category.textEditor" + id="org.rubypeople.rdt.ui.edit.text.ruby.folding.collapseMembers"> + </command> + <command + name="%ActionDefinition.foldingCollapseComments.name" + description="%ActionDefinition.foldingCollapseComments.description" + categoryId="org.eclipse.ui.category.textEditor" + id="org.rubypeople.rdt.ui.edit.text.ruby.folding.collapseComments"> </command> <command |
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7890/src/org/rubypeople/rdt/internal/ui/rubyeditor Modified Files: RubyEditorMessages.java RubyEditorActionContributor.java RubyEditorMessages.properties RubyEditor.java Log Message: Add a folding action menu to context ruler on left side of editor, and add command shortcuts for actions to manipulatae folding. Now users can collapse/expand all, comments, members, reset structure, etc. Index: RubyEditorMessages.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RubyEditorMessages.java 24 Feb 2006 20:03:58 -0000 1.5 --- RubyEditorMessages.java 9 Jun 2006 01:19:18 -0000 1.6 *************** *** 38,41 **** --- 38,43 ---- private static ResourceBundle fgBundleForConstructedKeys= ResourceBundle.getBundle(BUNDLE_FOR_CONSTRUCTED_KEYS); + public static String Editor_FoldingMenu_name; + /** * Returns the message bundle which contains constructed keys. Index: RubyEditorMessages.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.properties,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RubyEditorMessages.properties 24 Feb 2006 20:03:43 -0000 1.6 --- RubyEditorMessages.properties 9 Jun 2006 01:19:18 -0000 1.7 *************** *** 55,58 **** --- 55,60 ---- RubyOutlinePage_error_NoTopLevelType=Top level type not defined + Editor_FoldingMenu_name=F&olding + OpenOnSelection.description=Open an editor on the selected element OpenOnSelection.dialog.message=&Select or enter the element to open: Index: RubyEditor.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditor.java,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** RubyEditor.java 5 May 2006 01:13:27 -0000 1.46 --- RubyEditor.java 9 Jun 2006 01:19:18 -0000 1.47 *************** *** 18,21 **** --- 18,22 ---- import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuManager; + import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.text.BadLocationException; *************** *** 90,93 **** --- 91,95 ---- import org.rubypeople.rdt.internal.ui.RubyPlugin; import org.rubypeople.rdt.internal.ui.RubyUIMessages; + import org.rubypeople.rdt.internal.ui.actions.FoldingActionGroup; import org.rubypeople.rdt.internal.ui.text.IRubyPartitions; import org.rubypeople.rdt.internal.ui.text.RubyHeuristicScanner; *************** *** 100,103 **** --- 102,106 ---- import org.rubypeople.rdt.ui.actions.SurroundWithBeginRescueAction; import org.rubypeople.rdt.ui.text.folding.IRubyFoldingStructureProvider; + import org.rubypeople.rdt.ui.text.folding.IRubyFoldingStructureProviderExtension; public class RubyEditor extends RubyAbstractEditor { *************** *** 148,151 **** --- 151,161 ---- */ private ToggleFoldingRunner fFoldingRunner; + + /** + * The action group for folding. + * + * @since 0.9.0 + */ + private FoldingActionGroup fFoldingGroup; private BracketInserter fBracketInserter = new BracketInserter(); *************** *** 160,163 **** --- 170,182 ---- setOutlinerContextMenuId("#RubyScriptOutlinerContext"); //$NON-NLS-1$ } + + /** + * Returns the standard action group of this editor. + * + * @return returns this editor's standard action group + */ + protected ActionGroup getActionGroup() { + return actionGroup; + } protected void createActions() { *************** *** 195,198 **** --- 214,220 ---- setAction("Format", action); + + fFoldingGroup= new FoldingActionGroup(this, getViewer()); + ISelectionProvider provider= getSite().getSelectionProvider(); ISelection selection= provider.getSelection(); *************** *** 207,210 **** --- 229,236 ---- } + public final ISourceViewer getViewer() { + return getSourceViewer(); + } + /** * Configures the toggle comment action *************** *** 266,270 **** --- 292,330 ---- } } + + /** + * Resets the foldings structure according to the folding + * preferences. + * + * @since 0.9.0 + */ + public void resetProjection() { + if (fProjectionModelUpdater != null) { + fProjectionModelUpdater.initialize(); + } + } + + /* + * @see org.eclipse.ui.texteditor.AbstractTextEditor#rulerContextMenuAboutToShow(org.eclipse.jface.action.IMenuManager) + */ + protected void rulerContextMenuAboutToShow(IMenuManager menu) { + super.rulerContextMenuAboutToShow(menu); + IMenuManager foldingMenu= new MenuManager(RubyEditorMessages.Editor_FoldingMenu_name, "projection"); //$NON-NLS-1$ + menu.appendToGroup(ITextEditorActionConstants.GROUP_RULERS, foldingMenu); + IAction action= getAction("FoldingToggle"); //$NON-NLS-1$ + foldingMenu.add(action); + action= getAction("FoldingExpandAll"); //$NON-NLS-1$ + foldingMenu.add(action); + action= getAction("FoldingCollapseAll"); //$NON-NLS-1$ + foldingMenu.add(action); + action= getAction("FoldingRestore"); //$NON-NLS-1$ + foldingMenu.add(action); + action= getAction("FoldingCollapseMembers"); //$NON-NLS-1$ + foldingMenu.add(action); + action= getAction("FoldingCollapseComments"); //$NON-NLS-1$ + foldingMenu.add(action); + } + /** * Returns the annotation overlapping with the given range or *************** *** 1469,1471 **** --- 1529,1561 ---- } } + + /** + * Collapses all foldable members if supported by the folding + * structure provider. + * + * @since 0.9.0 + */ + public void collapseMembers() { + if (fProjectionModelUpdater instanceof IRubyFoldingStructureProviderExtension) { + IRubyFoldingStructureProviderExtension extension= (IRubyFoldingStructureProviderExtension) fProjectionModelUpdater; + extension.collapseMembers(); + } + } + + /** + * Collapses all foldable comments if supported by the folding + * structure provider. + * + * @since 0.9.0 + */ + public void collapseComments() { + if (fProjectionModelUpdater instanceof IRubyFoldingStructureProviderExtension) { + IRubyFoldingStructureProviderExtension extension= (IRubyFoldingStructureProviderExtension) fProjectionModelUpdater; + extension.collapseComments(); + } + } + + public FoldingActionGroup getFoldingActionGroup() { + return fFoldingGroup; + } } \ No newline at end of file Index: RubyEditorActionContributor.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorActionContributor.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** RubyEditorActionContributor.java 24 Feb 2006 20:04:22 -0000 1.11 --- RubyEditorActionContributor.java 9 Jun 2006 01:19:18 -0000 1.12 *************** *** 15,18 **** --- 15,19 ---- import org.eclipse.ui.texteditor.RetargetTextEditorAction; import org.rubypeople.rdt.internal.ui.RubyUIMessages; + import org.rubypeople.rdt.internal.ui.actions.FoldingActionGroup; import org.rubypeople.rdt.ui.actions.IRubyEditorActionDefinitionIds; import org.rubypeople.rdt.ui.actions.RubyActionIds; *************** *** 59,62 **** --- 60,72 ---- GotoMatchingBracketAction.GOTO_MATCHING_BRACKET)); + + if (part instanceof RubyEditor) { + RubyEditor javaEditor= (RubyEditor) part; + javaEditor.getActionGroup().fillActionBars(getActionBars()); + FoldingActionGroup foldingActions= javaEditor.getFoldingActionGroup(); + if (foldingActions != null) + foldingActions.updateActionBars(); + } + IActionBars actionBars = getActionBars(); actionBars.setGlobalActionHandler(RubyActionIds.COMMENT, getAction(textEditor, "Comment")); |
|
From: Christopher W. <caw...@us...> - 2006-06-09 01:19:20
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/folding In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7890/src/org/rubypeople/rdt/internal/ui/text/folding Modified Files: DefaultRubyFoldingStructureProvider.java Log Message: Add a folding action menu to context ruler on left side of editor, and add command shortcuts for actions to manipulatae folding. Now users can collapse/expand all, comments, members, reset structure, etc. Index: DefaultRubyFoldingStructureProvider.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/folding/DefaultRubyFoldingStructureProvider.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DefaultRubyFoldingStructureProvider.java 10 Feb 2006 19:55:23 -0000 1.6 --- DefaultRubyFoldingStructureProvider.java 9 Jun 2006 01:19:17 -0000 1.7 *************** *** 5,16 **** --- 5,19 ---- import java.util.ArrayList; + import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; + import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; + import java.util.Set; import org.eclipse.jface.preference.IPreferenceStore; *************** *** 48,51 **** --- 51,55 ---- import org.rubypeople.rdt.ui.PreferenceConstants; import org.rubypeople.rdt.ui.text.folding.IRubyFoldingStructureProvider; + import org.rubypeople.rdt.ui.text.folding.IRubyFoldingStructureProviderExtension; /** *************** *** 53,57 **** */ public class DefaultRubyFoldingStructureProvider implements IProjectionListener, ! IRubyFoldingStructureProvider { private ITextEditor fEditor; --- 57,61 ---- */ public class DefaultRubyFoldingStructureProvider implements IProjectionListener, ! IRubyFoldingStructureProvider, IRubyFoldingStructureProviderExtension { private ITextEditor fEditor; *************** *** 679,681 **** --- 683,800 ---- } + + /* filters */ + /** + * Filter for annotations. + * @since 0.9.0 + */ + private static interface Filter { + boolean match(RubyProjectionAnnotation annotation); + } + + private static final class RubyElementSetFilter implements Filter { + private final Set fSet; + private final boolean fMatchCollapsed; + + private RubyElementSetFilter(Set set, boolean matchCollapsed) { + fSet= set; + fMatchCollapsed= matchCollapsed; + } + + public boolean match(RubyProjectionAnnotation annotation) { + boolean stateMatch= fMatchCollapsed == annotation.isCollapsed(); + if (stateMatch && !annotation.isComment() && !annotation.isMarkedDeleted()) { + IRubyElement element= annotation.getElement(); + if (fSet.contains(element)) { + return true; + } + } + return false; + } + } + /** + * Member filter, matches nested members (but not top-level types). + * @since 0.9.0 + */ + private final Filter fMemberFilter = new Filter() { + public boolean match(RubyProjectionAnnotation annotation) { + if (!annotation.isCollapsed() && !annotation.isComment() && !annotation.isMarkedDeleted()) { + IRubyElement element= annotation.getElement(); + if (element instanceof IMember) { + if (element.getElementType() != IRubyElement.TYPE || ((IMember) element).getDeclaringType() != null) { + return true; + } + } + } + return false; + } + }; + + /** + * Comment filter, matches comments. + * @since 0.9.0 + */ + private final Filter fCommentFilter = new Filter() { + public boolean match(RubyProjectionAnnotation annotation) { + if (!annotation.isCollapsed() && annotation.isComment() && !annotation.isMarkedDeleted()) { + return true; + } + return false; + } + }; + + public void collapseMembers() { + modifyFiltered(fMemberFilter, false); + } + + public void collapseComments() { + modifyFiltered(fCommentFilter, false); + } + + public void collapseElements(IRubyElement[] elements) { + Set set= new HashSet(Arrays.asList(elements)); + modifyFiltered(new RubyElementSetFilter(set, false), false); + } + + public void expandElements(IRubyElement[] elements) { + Set set= new HashSet(Arrays.asList(elements)); + modifyFiltered(new RubyElementSetFilter(set, true), true); + } + + /** + * Collapses all annotations matched by the passed filter. + * + * @param filter the filter to use to select which annotations to collapse + * @param expand <code>true</code> to expand the matched annotations, <code>false</code> to + * collapse them + * @since 0.9.0 + */ + private void modifyFiltered(Filter filter, boolean expand) { + if (!isInstalled()) + return; + + ProjectionAnnotationModel model= (ProjectionAnnotationModel) fEditor.getAdapter(ProjectionAnnotationModel.class); + if (model == null) + return; + + List modified= new ArrayList(); + Iterator iter= model.getAnnotationIterator(); + while (iter.hasNext()) { + Object annotation= iter.next(); + if (annotation instanceof RubyProjectionAnnotation) { + RubyProjectionAnnotation java= (RubyProjectionAnnotation) annotation; + + if (filter.match(java)) { + if (expand) + java.markExpanded(); + else + java.markCollapsed(); + modified.add(java); + } + + } + } + + model.modifyAnnotations(null, null, (Annotation[]) modified.toArray(new Annotation[modified.size()])); + } } |
|
From: Christopher W. <caw...@us...> - 2006-06-09 01:19:20
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7890/src/org/rubypeople/rdt/ui/actions Modified Files: IRubyEditorActionDefinitionIds.java Log Message: Add a folding action menu to context ruler on left side of editor, and add command shortcuts for actions to manipulatae folding. Now users can collapse/expand all, comments, members, reset structure, etc. Index: IRubyEditorActionDefinitionIds.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/IRubyEditorActionDefinitionIds.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** IRubyEditorActionDefinitionIds.java 30 Mar 2006 03:06:19 -0000 1.5 --- IRubyEditorActionDefinitionIds.java 9 Jun 2006 01:19:17 -0000 1.6 *************** *** 48,51 **** --- 48,66 ---- */ public static final String OPEN_EDITOR= "org.rubypeople.rdt.ui.edit.text.ruby.open.editor"; //$NON-NLS-1$ + + /** + * Action definition id of the collapse members action + * (value: <code>"org.rubypeople.rdt.ui.edit.text.ruby.folding.collapseMembers"</code>). + * @since 0.9.0 + */ + public static final String FOLDING_COLLAPSE_MEMBERS= "org.rubypeople.rdt.ui.edit.text.ruby.folding.collapseMembers"; //$NON-NLS-1$ + + /** + * Action definition id of the collapse comments action + * (value: <code>"org.rubypeople.rdt.ui.edit.text.ruby.folding.collapseComments"</code>). + * @since 0.9.0 + */ + public static final String FOLDING_COLLAPSE_COMMENTS= "org.rubypeople.rdt.ui.edit.text.ruby.folding.collapseComments"; //$NON-NLS-1$ + |
|
From: Christopher W. <caw...@us...> - 2006-06-09 01:01:02
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26438/src/org/rubypeople/rdt/internal/core/parser Modified Files: RubyLintVisitor.java Log Message: Index: RubyLintVisitor.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RubyLintVisitor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RubyLintVisitor.java 17 May 2006 02:41:08 -0000 1.1 --- RubyLintVisitor.java 9 Jun 2006 01:00:57 -0000 1.2 *************** *** 116,121 **** protected Instruction handleNode(Node visited) { ! System.out.println(visited.toString() + ", position -> " ! + visited.getPosition()); return super.handleNode(visited); } --- 116,121 ---- protected Instruction handleNode(Node visited) { ! // System.out.println(visited.toString() + ", position -> " ! // + visited.getPosition()); return super.handleNode(visited); } *************** *** 134,137 **** --- 134,139 ---- ISourcePosition position, String message) { String value = RubyCore.getOption(compilerOption); + if (value == null) + return new Error(position, message); if (value.equals(RubyCore.WARNING)) return new Warning(position, message); |
|
From: Christopher W. <caw...@us...> - 2006-06-09 00:13:00
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23555/src/org/rubypeople/rdt/internal/ui/text Modified Files: RubyPartitionScanner.java Log Message: handle ?", ?', and ?/ as characters (not starts of strings or regex) Index: RubyPartitionScanner.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** RubyPartitionScanner.java 12 May 2006 21:39:35 -0000 1.12 --- RubyPartitionScanner.java 9 Jun 2006 00:12:57 -0000 1.13 *************** *** 11,14 **** --- 11,15 ---- import org.eclipse.jface.text.rules.IRule; import org.eclipse.jface.text.rules.IToken; + import org.eclipse.jface.text.rules.IWordDetector; import org.eclipse.jface.text.rules.MultiLineRule; import org.eclipse.jface.text.rules.PatternRule; *************** *** 79,82 **** --- 80,118 ---- rules.add(new WordPatternRule(new NumberSignDetector(), "?", "#", Token.UNDEFINED)); + // ugly hacks to make ?" and ?' recognized as characters + rules.add(new WordPatternRule(new IWordDetector() { + + public boolean isWordPart(char c) { + return c == '"'; + } + + public boolean isWordStart(char c) { + return c == '?'; + } + + }, "?", "\"", Token.UNDEFINED)); + rules.add(new WordPatternRule(new IWordDetector() { + + public boolean isWordPart(char c) { + return c == '\''; + } + + public boolean isWordStart(char c) { + return c == '?'; + } + + }, "?", "'", Token.UNDEFINED)); + rules.add(new WordPatternRule(new IWordDetector() { + + public boolean isWordPart(char c) { + return c == '/'; + } + + public boolean isWordStart(char c) { + return c == '?'; + } + + }, "?", "/", Token.UNDEFINED)); + rules.add(new EndOfLineRule("#", singleLineComment)); // Multiline comments |
|
From: Christopher W. <caw...@us...> - 2006-06-09 00:12:57
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/text In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23521/src/org/rubypeople/rdt/internal/ui/text Modified Files: TC_RubyPartitionScanner.java Log Message: handle ?", ?', and ?/ as characters (not starts of strings or regex) Index: TC_RubyPartitionScanner.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/text/TC_RubyPartitionScanner.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TC_RubyPartitionScanner.java 12 Dec 2005 20:49:25 -0000 1.4 --- TC_RubyPartitionScanner.java 9 Jun 2006 00:12:53 -0000 1.5 *************** *** 103,105 **** --- 103,133 ---- } + public void testRecognizeDivision() { + String source = "1/3 #This is a comment\n"; + + assertEquals(IDocument.DEFAULT_CONTENT_TYPE, this.getContentType(source, 0)); + assertEquals(IDocument.DEFAULT_CONTENT_TYPE, this.getContentType(source, 3)); + assertEquals(RubyPartitionScanner.RUBY_SINGLE_LINE_COMMENT, this.getContentType(source, 5)); + } + + public void testRecognizeOddballCharacters() { + String source = "?\" #comment\n"; + + assertEquals(IDocument.DEFAULT_CONTENT_TYPE, this.getContentType(source, 0)); + assertEquals(IDocument.DEFAULT_CONTENT_TYPE, this.getContentType(source, 2)); + assertEquals(RubyPartitionScanner.RUBY_SINGLE_LINE_COMMENT, this.getContentType(source, 5)); + + source = "?' #comment\n"; + + assertEquals(IDocument.DEFAULT_CONTENT_TYPE, this.getContentType(source, 0)); + assertEquals(IDocument.DEFAULT_CONTENT_TYPE, this.getContentType(source, 2)); + assertEquals(RubyPartitionScanner.RUBY_SINGLE_LINE_COMMENT, this.getContentType(source, 5)); + + source = "?/ #comment\n"; + + assertEquals(IDocument.DEFAULT_CONTENT_TYPE, this.getContentType(source, 0)); + assertEquals(IDocument.DEFAULT_CONTENT_TYPE, this.getContentType(source, 2)); + assertEquals(RubyPartitionScanner.RUBY_SINGLE_LINE_COMMENT, this.getContentType(source, 5)); + } + } |
|
From: Christopher W. <caw...@us...> - 2006-06-01 22:32:05
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1196/src/org/rubypeople/rdt/internal/ui/text/ruby Modified Files: RubyCompletionProcessor.java Log Message: Index: RubyCompletionProcessor.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyCompletionProcessor.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** RubyCompletionProcessor.java 12 May 2006 22:01:23 -0000 1.19 --- RubyCompletionProcessor.java 1 Jun 2006 22:32:00 -0000 1.20 *************** *** 312,319 **** } - private boolean isKeyword(String name) { - return getKeywords().contains(name); - } - /** * @param proposal --- 312,315 ---- |