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
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11479/src/org/rubypeople/rdt/ui Modified Files: RubyElementLabels.java RubyUI.java PreferenceConstants.java RubyElementSorter.java Added Files: StandardRubyElementContentProvider.java Log Message: my initial working version of a Ruby Browsing Perspective Index: RubyElementLabels.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/RubyElementLabels.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RubyElementLabels.java 10 Feb 2006 19:54:54 -0000 1.1 --- RubyElementLabels.java 25 Mar 2006 02:37:43 -0000 1.2 *************** *** 319,326 **** break; case IRubyElement.IMPORT_CONTAINER: ! case IRubyElement.IMPORT: getDeclarationLabel(element, flags, buf); break; ! case IRubyElement.PROJECT: case IRubyElement.RUBY_MODEL: buf.append(element.getElementName()); --- 319,326 ---- break; case IRubyElement.IMPORT_CONTAINER: ! case IRubyElement.IMPORT_DECLARATION: getDeclarationLabel(element, flags, buf); break; ! case IRubyElement.RUBY_PROJECT: case IRubyElement.RUBY_MODEL: buf.append(element.getElementName()); Index: PreferenceConstants.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/PreferenceConstants.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PreferenceConstants.java 18 Feb 2006 16:53:51 -0000 1.12 --- PreferenceConstants.java 25 Mar 2006 02:37:44 -0000 1.13 *************** *** 224,227 **** --- 224,236 ---- public static final String FORMATTER_PROFILE = "formatter_profile"; //$NON-NLS-1$ + /** + * A named preference that controls the layout of the Ruby Browsing views vertically. Boolean value. + * <p> + * Value is of type <code>Boolean</code>. If <code>true<code> the views are stacked vertical. + * If <code>false</code> they are stacked horizontal. + * </p> + */ + public static final String BROWSING_STACK_VERTICALLY= "org.rubypeople.rdt.ui.browsing.stackVertically"; //$NON-NLS-1$ + public static void initializeDefaultValues(IPreferenceStore store) { store.setDefault(PreferenceConstants.EDITOR_SHOW_SEGMENTS, false); *************** *** 245,248 **** --- 254,258 ---- store.setDefault(PreferenceConstants.APPEARANCE_COMPRESS_PACKAGE_NAMES, false); store.setDefault(PreferenceConstants.APPEARANCE_PKG_NAME_PATTERN_FOR_PKG_VIEW, ""); //$NON-NLS-1$ + store.setDefault(PreferenceConstants.BROWSING_STACK_VERTICALLY, false); // TODO Expose these preferences to the user! Index: RubyElementSorter.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/RubyElementSorter.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RubyElementSorter.java 10 Feb 2006 19:54:54 -0000 1.4 --- RubyElementSorter.java 25 Mar 2006 02:37:44 -0000 1.5 *************** *** 102,108 **** case IRubyElement.IMPORT_CONTAINER: return IMPORT_CONTAINER; ! case IRubyElement.IMPORT: return IMPORT_DECLARATION; ! case IRubyElement.PROJECT: return PROJECTS; case IRubyElement.SCRIPT: --- 102,108 ---- case IRubyElement.IMPORT_CONTAINER: return IMPORT_CONTAINER; ! case IRubyElement.IMPORT_DECLARATION: return IMPORT_DECLARATION; ! case IRubyElement.RUBY_PROJECT: return PROJECTS; case IRubyElement.SCRIPT: --- NEW FILE: StandardRubyElementContentProvider.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; import java.util.ArrayList; import java.util.List; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.Viewer; import org.rubypeople.rdt.core.*; /** * A base content provider for Ruby elements. It provides access to the * Ruby element hierarchy without listening to changes in the Ruby model. * If updating the presentation on Ruby model change is required than * clients have to subclass, listen to Ruby model changes and have to update * the UI using corresponding methods provided by the JFace viewers or their * own UI presentation. * <p> * The following Ruby element hierarchy is surfaced by this content provider: * <p> * <pre> Ruby model (<code>IRubyModel</code>) Ruby project (<code>IRubyProject</code>) package fragment root (<code>IPackageFragmentRoot</code>) package fragment (<code>IPackageFragment</code>) compilation unit (<code>ICompilationUnit</code>) binary class file (<code>IClassFile</code>) * </pre> * </p> * <p> * Note that when the entire Ruby project is declared to be package fragment root, * the corresponding package fragment root element that normally appears between the * Ruby project and the package fragments is automatically filtered out. * </p> * * @since 2.0 */ public class StandardRubyElementContentProvider implements ITreeContentProvider { protected static final Object[] NO_CHILDREN= new Object[0]; protected boolean fProvideMembers; protected boolean fProvideWorkingCopy; /** * Creates a new content provider. The content provider does not * provide members of compilation units or class files. */ public StandardRubyElementContentProvider() { this(false); } /** *@deprecated Use {@link #StandardRubyElementContentProvider(boolean)} instead. * Since 3.0 compilation unit children are always provided as working copies. The Ruby Model * does not support the 'original' mode anymore. */ public StandardRubyElementContentProvider(boolean provideMembers, boolean provideWorkingCopy) { this(provideMembers); } /** * Creates a new <code>StandardRubyElementContentProvider</code>. * * @param provideMembers if <code>true</code> members below compilation units * and class files are provided. */ public StandardRubyElementContentProvider(boolean provideMembers) { fProvideMembers= provideMembers; fProvideWorkingCopy= provideMembers; } /** * Returns whether members are provided when asking * for a compilation units or class file for its children. * * @return <code>true</code> if the content provider provides members; * otherwise <code>false</code> is returned */ public boolean getProvideMembers() { return fProvideMembers; } /** * Sets whether the content provider is supposed to return members * when asking a compilation unit or class file for its children. * * @param b if <code>true</code> then members are provided. * If <code>false</code> compilation units and class files are the * leaves provided by this content provider. */ public void setProvideMembers(boolean b) { //hello fProvideMembers= b; } /** * @deprecated Since 3.0 compilation unit children are always provided as working copies. The Ruby model * does not support the 'original' mode anymore. */ public boolean getProvideWorkingCopy() { return fProvideWorkingCopy; } /** * @deprecated Since 3.0 compilation unit children are always provided from the working copy. The Ruby model * offers a unified world and does not support the 'original' mode anymore. */ public void setProvideWorkingCopy(boolean b) { fProvideWorkingCopy= b; } /* (non-Rubydoc) * @see IWorkingCopyProvider#providesWorkingCopies() */ public boolean providesWorkingCopies() { return getProvideWorkingCopy(); } /* (non-Rubydoc) * Method declared on IStructuredContentProvider. */ public Object[] getElements(Object parent) { return getChildren(parent); } /* (non-Rubydoc) * Method declared on IContentProvider. */ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { } /* (non-Rubydoc) * Method declared on IContentProvider. */ public void dispose() { } /* (non-Rubydoc) * Method declared on ITreeContentProvider. */ public Object[] getChildren(Object element) { if (!exists(element)) return NO_CHILDREN; try { if (element instanceof IRubyModel) return getRubyProjects((IRubyModel)element); if (element instanceof IRubyProject) return getRubyScripts((IRubyProject)element); if (element instanceof IFolder) return getResources((IFolder)element); if (getProvideMembers() && element instanceof ISourceReference && element instanceof IParent) { return ((IParent)element).getChildren(); } } catch (RubyModelException e) { return NO_CHILDREN; } return NO_CHILDREN; } private Object[] getRubyScripts(IRubyProject project) throws RubyModelException { return project.getRubyScripts(); } /* (non-Rubydoc) * @see ITreeContentProvider */ public boolean hasChildren(Object element) { if (getProvideMembers()) { // assume scripts are never empty if (element instanceof IRubyScript) { return true; } } else { // don't allow to drill down into a script if (element instanceof IRubyScript || element instanceof IFile) return false; } if (element instanceof IRubyProject) { IRubyProject jp= (IRubyProject)element; if (!jp.getProject().isOpen()) { return false; } } if (element instanceof IParent) { try { // when we have Ruby children return true, else we fetch all the children if (((IParent)element).hasChildren()) return true; } catch(RubyModelException e) { return true; } } Object[] children= getChildren(element); return (children != null) && children.length > 0; } /* (non-Rubydoc) * Method declared on ITreeContentProvider. */ public Object getParent(Object element) { if (!exists(element)) return null; return internalGetParent(element); } /** * Note: This method is for internal use only. Clients should not call this method. */ protected Object[] getRubyProjects(IRubyModel jm) throws RubyModelException { return jm.getRubyProjects(); } private Object[] getResources(IFolder folder) { try { IResource[] members= folder.members(); IRubyProject javaProject= RubyCore.create(folder.getProject()); if (javaProject == null || !javaProject.exists()) return members; // boolean isFolderOnClasspath = javaProject.isOnClasspath(folder); boolean isFolderOnClasspath = true; List nonRubyResources= new ArrayList(); // Can be on classpath but as a member of non-java resource folder for (int i= 0; i < members.length; i++) { IResource member= members[i]; // A resource can also be a java element // in the case of exclusion and inclusion filters. // We therefore exclude Ruby elements from the list // of non-Ruby resources. if (isFolderOnClasspath) { // if (javaProject.findPackageFragmentRoot(member.getFullPath()) == null) { // nonRubyResources.add(member); // } // } else if (!javaProject.isOnClasspath(member)) { // nonRubyResources.add(member); } } return nonRubyResources.toArray(); } catch(CoreException e) { return NO_CHILDREN; } } /** * Note: This method is for internal use only. Clients should not call this method. */ protected boolean isClassPathChange(IRubyElementDelta delta) { // need to test the flags only for package fragment roots //if (delta.getElement().getElementType() != IRubyElement.PACKAGE_FRAGMENT_ROOT) return false; // int flags= delta.getFlags(); // return (delta.getKind() == IRubyElementDelta.CHANGED && // ((flags & IRubyElementDelta.F_ADDED_TO_CLASSPATH) != 0) || // ((flags & IRubyElementDelta.F_REMOVED_FROM_CLASSPATH) != 0) || // ((flags & IRubyElementDelta.F_REORDER) != 0)); } /** * Note: This method is for internal use only. Clients should not call this method. */ protected boolean exists(Object element) { if (element == null) { return false; } if (element instanceof IResource) { return ((IResource)element).exists(); } if (element instanceof IRubyElement) { return ((IRubyElement)element).exists(); } return true; } /** * Note: This method is for internal use only. Clients should not call this method. */ protected Object internalGetParent(Object element) { // try to map resources to the containing package fragment if (element instanceof IResource) { IResource parent= ((IResource)element).getParent(); IRubyElement jParent= RubyCore.create(parent); // http://bugs.eclipse.org/bugs/show_bug.cgi?id=31374 if (jParent != null && jParent.exists()) return jParent; return parent; } else if (element instanceof IRubyElement) { IRubyElement parent= ((IRubyElement) element).getParent(); return parent; } return null; } /** * Note: This method is for internal use only. Clients should not call this method. */ protected static Object[] concatenate(Object[] a1, Object[] a2) { int a1Len= a1.length; int a2Len= a2.length; Object[] res= new Object[a1Len + a2Len]; System.arraycopy(a1, 0, res, 0, a1Len); System.arraycopy(a2, 0, res, a1Len, a2Len); return res; } } Index: RubyUI.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/RubyUI.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RubyUI.java 12 Mar 2005 15:32:34 -0000 1.1 --- RubyUI.java 25 Mar 2006 02:37:44 -0000 1.2 *************** *** 35,37 **** --- 35,70 ---- */ public static final String ID_PLUGIN = "org.rubypeople.rdt.ui"; //$NON-NLS-1$ + public static final String ID_ACTION_SET = null; + + /** + * The view part id of the Ruby Browsing Projects view + * (value <code>"org.rubypeople.rdt.ui.ProjectsView"</code>). + * + * @since 0.8.0 + */ + public static String ID_PROJECTS_VIEW= "org.rubypeople.rdt.ui.ProjectsView"; //$NON-NLS-1$ + + /** + * The view part id of the Ruby Browsing Types view + * (value <code>"org.rubypeople.rdt.ui.TypesView"</code>). + * + * @since 0.8.0 + */ + public static String ID_TYPES_VIEW= "org.rubypeople.rdt.ui.TypesView"; //$NON-NLS-1$ + + /** + * The view part id of the Ruby Browsing Memberss view + * (value <code>"org.rubypeople.rdt.ui.MembersView"</code>). + * + * @since 0.8.0 + */ + public static String ID_MEMBERS_VIEW= "org.rubypeople.rdt.ui.MembersView"; //$NON-NLS-1$ + + /** + * The id of the Ruby Element Creation action set + * (value <code>"org.rubypeople.rdt.ui.RubyElementCreationActionSet"</code>). + * + * @since 0.8.0 + */ + public static final String ID_ELEMENT_CREATION_ACTION_SET= "org.rubypeople.rdt.ui.RubyElementCreationActionSet"; //$NON-NLS-1$ } \ No newline at end of file |
|
From: Christopher W. <caw...@us...> - 2006-03-25 02:37:47
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11479 Modified Files: plugin.properties plugin.xml Log Message: my initial working version of a Ruby Browsing Perspective Index: plugin.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/plugin.properties,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** plugin.properties 24 Feb 2006 20:02:46 -0000 1.28 --- plugin.properties 25 Mar 2006 02:37:43 -0000 1.29 *************** *** 1,4 **** ######################################### ! # (c) Copyright RubyPeople, Inc. 2005 # All Rights Reserved. ######################################### --- 1,4 ---- ######################################### ! # (c) Copyright RubyPeople, Inc. 2006 # All Rights Reserved. ######################################### *************** *** 7,10 **** --- 7,17 ---- providerName=RubyPeople, Inc. + # Browsing + Browsing.perspectiveName= Ruby Browsing + Browsing.viewCategoryName= Ruby Browsing + Browsing.projectsViewName= Projects + Browsing.typesViewName= Types + Borwesing.membersViewName = Members + editorPopupExtender=Editor Popup Extender foldingStructureProviders=Folding Structure Providers Index: plugin.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/plugin.xml,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** plugin.xml 24 Feb 2006 20:02:46 -0000 1.74 --- plugin.xml 25 Mar 2006 02:37:43 -0000 1.75 *************** *** 63,66 **** --- 63,146 ---- </perspective> </extension> + <!-- =========================================================================== --> + <!-- Ruby Browsing --> + <!-- =========================================================================== --> + <extension + point="org.eclipse.ui.perspectives"> + <perspective + name="%Browsing.perspectiveName" + icon="$nl$/icons/full/eview16/browse_persp.gif" + class="org.rubypeople.rdt.internal.ui.browsing.RubyBrowsingPerspectiveFactory" + id="org.rubypeople.rdt.ui.RubyBrowsingPerspective"> + </perspective> + </extension> + <extension + point="org.eclipse.ui.perspectiveExtensions"> + <perspectiveExtension + targetID="org.eclipse.ui.resourcePerspective"> + <perspectiveShortcut + id="org.rubypeople.rdt.ui.RubyBrowsingPerspective"> + </perspectiveShortcut> + </perspectiveExtension> + <perspectiveExtension + targetID="org.rubypeople.rdt.ui.RubyBrowsingPerspective"> + <perspectiveShortcut + id="org.rubypeople.rdt.ui.RubyBrowsingPerspective"> + </perspectiveShortcut> + </perspectiveExtension> + <perspectiveExtension + targetID="org.rubypeople.rdt.ui.RubyPerspective"> + <perspectiveShortcut + id="org.rubypeople.rdt.ui.RubyBrowsingPerspective"> + </perspectiveShortcut> + </perspectiveExtension> + <perspectiveExtension + targetID="org.rubypeople.rdt.ui.RubyBrowsingPerspective"> + <perspectiveShortcut + id="org.rubypeople.rdt.ui.RubyPerspective"> + </perspectiveShortcut> + </perspectiveExtension> + <perspectiveExtension + targetID="org.rubypeople.rdt.ui.RubyBrowsingPerspective"> + <perspectiveShortcut + id="org.eclipse.debug.ui.DebugPerspective"> + </perspectiveShortcut> + </perspectiveExtension> + <perspectiveExtension + targetID="org.eclipse.debug.ui.DebugPerspective"> + <perspectiveShortcut + id="org.rubypeople.rdt.ui.RubyBrowsingPerspective"> + </perspectiveShortcut> + </perspectiveExtension> + </extension> + <extension + point="org.eclipse.ui.views"> + <category + name="%Browsing.viewCategoryName" + id="org.rubypeople.rdt.ui.ruby.browsing"> + </category> + <view + name="%Browsing.projectsViewName" + icon="$nl$/icons/full/eview16/projects.gif" + category="org.rubypeople.rdt.ui.ruby.browsing" + class="org.rubypeople.rdt.internal.ui.browsing.ProjectsView" + id="org.rubypeople.rdt.ui.ProjectsView"> + </view> + <view + name="%Browsing.typesViewName" + icon="$nl$/icons/full/eview16/types.gif" + category="org.rubypeople.rdt.ui.ruby.browsing" + class="org.rubypeople.rdt.internal.ui.browsing.TypesView" + id="org.rubypeople.rdt.ui.TypesView"> + </view> + <view + name="%Browsing.membersViewName" + icon="$nl$/icons/full/eview16/members.gif" + category="org.rubypeople.rdt.ui.ruby.browsing" + class="org.rubypeople.rdt.internal.ui.browsing.MembersView" + id="org.rubypeople.rdt.ui.MembersView"> + </view> + </extension> + <extension point="org.eclipse.ui.newWizards"> *************** *** 144,147 **** --- 224,234 ---- id="org.rubypeople.rdt.ui.views.RIView"> </view> + <view + name="Browsing" + icon="icons/full/elcl16/help.gif" + category="org.rubypeople.rdt.ui.ruby" + class="org.rubypeople.rdt.internal.ui.browsing.SimpleView" + id="org.rubypeople.rdt.ui.views.BrowsingView"> + </view> </extension> <extension point="org.eclipse.ui.perspectiveExtensions"> |
|
From: Christopher W. <caw...@us...> - 2006-03-25 02:27:41
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6145/src/org/rubypeople/rdt/internal/core/util Modified Files: Util.java CharOperation.java Added Files: SimpleWordSet.java Log Message: my initial working version of a Ruby Browsing Perspective Index: CharOperation.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/CharOperation.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CharOperation.java 13 Dec 2005 19:59:47 -0000 1.3 --- CharOperation.java 25 Mar 2006 02:27:35 -0000 1.4 *************** *** 19,36 **** * * <pre> - * * * * * ! * toBeFound = 'c' ! * array = { ' a', 'b', 'c', 'd' } ! * start = 2 [...1245 lines suppressed...] ! * the array for which a hashcode is required ! * @return the hashcode ! * @throws NullPointerException ! * if array is null ! */ ! public static final int hashCode(char[] array) { ! int length = array.length; ! int hash = length == 0 ? 31 : array[0]; ! if (length < 8) { ! for (int i = length; --i > 0;) ! hash = (hash * 31) + array[i]; ! } else { ! // 8 characters is enough to compute a decent hash code, don't waste ! // time examining every character ! for (int i = length - 1, last = i > 16 ? i - 16 : 0; i > last; i -= 2) ! hash = (hash * 31) + array[i]; ! } ! return hash & 0x7FFFFFFF; ! } } --- NEW FILE: SimpleWordSet.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 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.core.util; public final class SimpleWordSet { // to avoid using Enumerations, walk the individual values skipping nulls public char[][] words; public int elementSize; // number of elements in the table public int threshold; public SimpleWordSet(int size) { this.elementSize = 0; this.threshold = size; // size represents the expected number of elements int extraRoom = (int) (size * 1.5f); if (this.threshold == extraRoom) extraRoom++; this.words = new char[extraRoom][]; } public char[] add(char[] word) { int length = this.words.length; int index = CharOperation.hashCode(word) % length; char[] current; while ((current = words[index]) != null) { if (CharOperation.equals(current, word)) return current; if (++index == length) index = 0; } words[index] = word; // assumes the threshold is never equal to the size of the table if (++elementSize > threshold) rehash(); return word; } public boolean includes(char[] word) { int length = this.words.length; int index = CharOperation.hashCode(word) % length; char[] current; while ((current = words[index]) != null) { if (CharOperation.equals(current, word)) return true; if (++index == length) index = 0; } return false; } private void rehash() { SimpleWordSet newSet = new SimpleWordSet(elementSize * 2); // double the number of expected elements char[] current; for (int i = words.length; --i >= 0;) if ((current = words[i]) != null) newSet.add(current); this.words = newSet.words; this.elementSize = newSet.elementSize; this.threshold = newSet.threshold; } } Index: Util.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/Util.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Util.java 22 Feb 2006 20:04:04 -0000 1.7 --- Util.java 25 Mar 2006 02:27:35 -0000 1.8 *************** *** 5,8 **** --- 5,12 ---- package org.rubypeople.rdt.internal.core.util; + import java.io.BufferedInputStream; + import java.io.IOException; + import java.io.InputStream; + import java.io.InputStreamReader; import java.io.PrintStream; import java.util.Locale; *************** *** 10,18 **** --- 14,27 ---- import java.util.ResourceBundle; + import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; + import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Status; + import org.eclipse.core.runtime.content.IContentType; import org.rubypeople.rdt.core.IRubyElement; + import org.rubypeople.rdt.core.IRubyModelStatusConstants; import org.rubypeople.rdt.core.RubyConventions; import org.rubypeople.rdt.core.RubyCore; *************** *** 27,30 **** --- 36,41 ---- /* Bundle containing messages */ protected static ResourceBundle bundle; + private static boolean ENABLE_RUBY_LIKE_EXTENSIONS = true; + private static char[][] RUBY_LIKE_EXTENSIONS; private final static String bundleName = "org.rubypeople.rdt.internal.core.util.messages"; //$NON-NLS-1$ *************** *** 328,332 **** switch (elementType) { case IRubyElement.RUBY_MODEL: ! case IRubyElement.PROJECT: return false; case IRubyElement.SCRIPT: --- 339,343 ---- switch (elementType) { case IRubyElement.RUBY_MODEL: ! case IRubyElement.RUBY_PROJECT: return false; case IRubyElement.SCRIPT: *************** *** 343,347 **** --- 354,545 ---- } } + + /** + * Returns the substring of the given file name, ending at the start of a + * Ruby like extension. The entire file name is returned if it doesn't end + * with a Ruby like extension. + */ + public static String getNameWithoutRubyLikeExtension(String fileName) { + int index = indexOfRubyLikeExtension(fileName); + if (index == -1) + return fileName; + return fileName.substring(0, index); + } + + /* + * Returns the index of the Java like extension of the given file name + * or -1 if it doesn't end with a known Java like extension. + * Note this is the index of the '.' even if it is not considered part of the extension. + */ + public static int indexOfRubyLikeExtension(String fileName) { + int fileNameLength = fileName.length(); + char[][] javaLikeExtensions = getRubyLikeExtensions(); + extensions: for (int i = 0, length = javaLikeExtensions.length; i < length; i++) { + char[] extension = javaLikeExtensions[i]; + int extensionLength = extension.length; + int extensionStart = fileNameLength - extensionLength; + int dotIndex = extensionStart - 1; + if (dotIndex < 0) continue; + if (fileName.charAt(dotIndex) != '.') continue; + for (int j = 0; j < extensionLength; j++) { + if (fileName.charAt(extensionStart + j) != extension[j]) + continue extensions; + } + return dotIndex; + } + return -1; + } + + /** + * Returns the registered Ruby like extensions. + */ + public static char[][] getRubyLikeExtensions() { + if (RUBY_LIKE_EXTENSIONS == null) { + // TODO (jerome) reenable once RDT UI supports other file extensions (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=71460) + if (!ENABLE_RUBY_LIKE_EXTENSIONS) + RUBY_LIKE_EXTENSIONS = new char[][] {"rb".toCharArray()}; + else { + IContentType javaContentType = Platform.getContentTypeManager().getContentType(RubyCore.RUBY_SOURCE_CONTENT_TYPE); + String[] fileExtensions = javaContentType == null ? null : javaContentType.getFileSpecs(IContentType.FILE_EXTENSION_SPEC); + // note that file extensions contains "java" as it is defined in JDT Core's plugin.xml + int length = fileExtensions == null ? 0 : fileExtensions.length; + char[][] extensions = new char[length][]; + SimpleWordSet knownExtensions = new SimpleWordSet(length); // used to ensure no duplicate extensions + extensions[0] = "rb".toCharArray(); // ensure that "rb" is first + knownExtensions.add(extensions[0]); + int index = 1; + for (int i = 0; i < length; i++) { + String fileExtension = fileExtensions[i]; + char[] extension = fileExtension.toCharArray(); + if (!knownExtensions.includes(extension)) { + extensions[index++] = extension; + knownExtensions.add(extension); + } + } + if (index != length) + System.arraycopy(extensions, 0, extensions = new char[index][], 0, index); + RUBY_LIKE_EXTENSIONS = extensions; + } + } + return RUBY_LIKE_EXTENSIONS; + } + + private static final int DEFAULT_READING_SIZE = 8192; + + /** + * @param file + * @return + * @throws IOException + * @throws CoreException + */ + public static char[] getResourceContentsAsCharArray(IFile file) throws RubyModelException { + // Get encoding from file + String encoding = null; + try { + encoding = file.getCharset(); + } catch (CoreException ce) { + // do not use any encoding + } + return getResourceContentsAsCharArray(file, encoding); + } + + public static char[] getResourceContentsAsCharArray(IFile file, String encoding) throws RubyModelException { + // Get resource contents + InputStream stream = null; + try { + stream = new BufferedInputStream(file.getContents(true)); + } catch (CoreException e) { + throw new RubyModelException(e, IRubyModelStatusConstants.ELEMENT_DOES_NOT_EXIST); + } + try { + return Util.getInputStreamAsCharArray(stream, -1, encoding); + } catch (IOException e) { + throw new RubyModelException(e, IRubyModelStatusConstants.IO_EXCEPTION); + } finally { + try { + stream.close(); + } catch (IOException e) { + // ignore + } + } + } + + /** + * Returns the given input stream's contents as a character array. If a + * length is specified (ie. if length != -1), only length chars are + * returned. Otherwise all chars in the stream are returned. Note this + * doesn't close the stream. + * + * @throws IOException + * if a problem occured reading the stream. + */ + public static char[] getInputStreamAsCharArray(InputStream stream, int length, String encoding) throws IOException { + InputStreamReader reader = null; + reader = encoding == null ? new InputStreamReader(stream) : new InputStreamReader(stream, encoding); + char[] contents; + if (length == -1) { + contents = new char[0]; + int contentsLength = 0; + int amountRead = -1; + do { + int amountRequested = Math.max(stream.available(), DEFAULT_READING_SIZE); // read + // at + // least + // 8K + + // resize contents if needed + if (contentsLength + amountRequested > contents.length) { + System.arraycopy(contents, 0, contents = new char[contentsLength + amountRequested], 0, contentsLength); + } + + // read as many chars as possible + amountRead = reader.read(contents, contentsLength, amountRequested); + + if (amountRead > 0) { + // remember length of contents + contentsLength += amountRead; + } + } while (amountRead != -1); + + // Do not keep first character for UTF-8 BOM encoding + int start = 0; + if (contentsLength > 0 && "UTF-8".equals(encoding)) { //$NON-NLS-1$ + if (contents[0] == 0xFEFF) { // if BOM char then skip + contentsLength--; + start = 1; + } + } + // resize contents if necessary + if (contentsLength < contents.length) { + System.arraycopy(contents, start, contents = new char[contentsLength], 0, contentsLength); + } + } else { + contents = new char[length]; + int len = 0; + int readSize = 0; + while ((readSize != -1) && (len != length)) { + // See PR 1FMS89U + // We record first the read size. In this case len is the actual + // read size. + len += readSize; + readSize = reader.read(contents, len, length - len); + } + // Do not keep first character for UTF-8 BOM encoding + int start = 0; + if (length > 0 && "UTF-8".equals(encoding)) { //$NON-NLS-1$ + if (contents[0] == 0xFEFF) { // if BOM char then skip + len--; + start = 1; + } + } + // See PR 1FMS89U + // Now we need to resize in case the default encoding used more than + // one byte for each + // character + if (len != length) System.arraycopy(contents, start, (contents = new char[len]), 0, len); + } + return contents; + } } |
|
From: Christopher W. <caw...@us...> - 2006-03-25 02:27:40
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6145/src/org/rubypeople/rdt/core Modified Files: IRubyScript.java IRubyElement.java IRubyProject.java RubyCore.java Log Message: my initial working version of a Ruby Browsing Perspective Index: IRubyScript.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/IRubyScript.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** IRubyScript.java 13 Dec 2005 19:58:55 -0000 1.8 --- IRubyScript.java 25 Mar 2006 02:27:36 -0000 1.9 *************** *** 374,376 **** --- 374,378 ---- */ IRubyElement getElementAt(int position) throws RubyModelException; + + IType findPrimaryType(); } \ No newline at end of file Index: RubyCore.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** RubyCore.java 22 Feb 2006 21:05:32 -0000 1.30 --- RubyCore.java 25 Mar 2006 02:27:36 -0000 1.31 *************** *** 190,193 **** --- 190,203 ---- public static final String DO_NOT_INSERT = "do not insert"; //$NON-NLS-1$ + /** + * Value of the content-type for Ruby source files. Use this value to retrieve the Ruby content type + * from the content type manager, and to add new Ruby-like extensions to this content type. + * + * @see org.eclipse.core.runtime.content.IContentTypeManager#getContentType(String) + * @see #getRubyLikeExtensions() + * @since 0.8.0 + */ + public static final String RUBY_SOURCE_CONTENT_TYPE = RubyCore.PLUGIN_ID+".rubySource" ; //$NON-NLS-1$ + private SymbolIndex symbolIndex; private ISymbolFinder symbolFinder; Index: IRubyElement.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/IRubyElement.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** IRubyElement.java 10 Feb 2006 18:30:37 -0000 1.6 --- IRubyElement.java 25 Mar 2006 02:27:36 -0000 1.7 *************** *** 33,42 **** public static final int RUBY_MODEL = 0; ! public static final int PROJECT = 1; public static final int SCRIPT = 2; public static final int TYPE = 3; public static final int METHOD = 4; public static final int GLOBAL = 5; ! public static final int IMPORT = 6; public static final int CONSTANT = 7; public static final int CLASS_VAR = 8; --- 33,42 ---- public static final int RUBY_MODEL = 0; ! public static final int RUBY_PROJECT = 1; public static final int SCRIPT = 2; public static final int TYPE = 3; public static final int METHOD = 4; public static final int GLOBAL = 5; ! public static final int IMPORT_DECLARATION = 6; public static final int CONSTANT = 7; public static final int CLASS_VAR = 8; Index: IRubyProject.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/IRubyProject.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** IRubyProject.java 13 Dec 2005 19:58:55 -0000 1.5 --- IRubyProject.java 25 Mar 2006 02:27:36 -0000 1.6 *************** *** 104,106 **** --- 104,110 ---- Map getOptions(boolean inheritRubyCoreOptions); + public abstract IRubyScript[] getRubyScripts() throws RubyModelException; + + public abstract Object[] getNonRubyResources() throws RubyModelException; + } \ No newline at end of file |
|
From: Christopher W. <caw...@us...> - 2006-03-25 02:27:40
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6145/src/org/rubypeople/rdt/internal/core Modified Files: Openable.java RubyModel.java RubyProjectElementInfo.java RubyProject.java RubyModelCache.java RubyImport.java DeltaProcessor.java ModelUpdater.java RubyScript.java Log Message: my initial working version of a Ruby Browsing Perspective Index: Openable.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/Openable.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Openable.java 16 Oct 2005 21:02:16 -0000 1.6 --- Openable.java 25 Mar 2006 02:27:36 -0000 1.7 *************** *** 164,168 **** // to see if they have an child with unsaved changes int elementType = getElementType(); ! if (elementType == PROJECT || elementType == RUBY_MODEL) { // fix for // 1FWNMHH Enumeration openBuffers = getBufferManager().getOpenBuffers(); --- 164,168 ---- // to see if they have an child with unsaved changes int elementType = getElementType(); ! if (elementType == RUBY_PROJECT || elementType == RUBY_MODEL) { // fix for // 1FWNMHH Enumeration openBuffers = getBufferManager().getOpenBuffers(); *************** *** 223,227 **** String element; switch (getElementType()) { ! case PROJECT: element = "project"; //$NON-NLS-1$ break; --- 223,227 ---- String element; switch (getElementType()) { ! case RUBY_PROJECT: element = "project"; //$NON-NLS-1$ break; Index: RubyScript.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScript.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** RubyScript.java 13 Dec 2005 19:58:56 -0000 1.18 --- RubyScript.java 25 Mar 2006 02:27:36 -0000 1.19 *************** *** 56,60 **** import org.rubypeople.rdt.internal.core.buffer.BufferManager; import org.rubypeople.rdt.internal.core.parser.RubyParser; ! import org.rubypeople.rdt.internal.core.parser.Util; /** --- 56,61 ---- import org.rubypeople.rdt.internal.core.buffer.BufferManager; import org.rubypeople.rdt.internal.core.parser.RubyParser; ! import org.rubypeople.rdt.internal.core.util.Util; ! /** *************** *** 620,622 **** --- 621,635 ---- return array; } + + /** + * @see IRubyScript#findPrimaryType() + */ + public IType findPrimaryType() { + String typeName = Util.getNameWithoutRubyLikeExtension(getElementName()); + IType primaryType= getType(typeName); + if (primaryType.exists()) { + return primaryType; + } + return null; + } } \ No newline at end of file Index: RubyProject.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyProject.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** RubyProject.java 22 Feb 2006 21:05:33 -0000 1.19 --- RubyProject.java 25 Mar 2006 02:27:36 -0000 1.20 *************** *** 35,38 **** --- 35,39 ---- import org.rubypeople.rdt.core.IRubyElement; import org.rubypeople.rdt.core.IRubyProject; + import org.rubypeople.rdt.core.IRubyScript; import org.rubypeople.rdt.core.IType; import org.rubypeople.rdt.core.RubyCore; *************** *** 439,443 **** */ public int getElementType() { ! return IRubyElement.PROJECT; } --- 440,444 ---- */ public int getElementType() { ! return IRubyElement.RUBY_PROJECT; } *************** *** 697,699 **** --- 698,722 ---- } + public IRubyScript[] getRubyScripts() throws RubyModelException { + Object[] children; + int length; + IRubyScript[] scripts; + + System.arraycopy( + children = getChildren(), + 0, + scripts = new IRubyScript[length = children.length], + 0, + length); + + return scripts; + } + + /** + * Returns an array of non-ruby resources contained in the receiver. + */ + public Object[] getNonRubyResources() throws RubyModelException { + return ((RubyProjectElementInfo) getElementInfo()).getNonRubyResources(this); + } + } Index: RubyModel.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyModel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RubyModel.java 5 Mar 2005 15:18:46 -0000 1.3 --- RubyModel.java 25 Mar 2006 02:27:36 -0000 1.4 *************** *** 112,116 **** */ public IRubyProject[] getRubyProjects() throws RubyModelException { ! ArrayList list = getChildrenOfType(PROJECT); IRubyProject[] array = new IRubyProject[list.size()]; list.toArray(array); --- 112,116 ---- */ public IRubyProject[] getRubyProjects() throws RubyModelException { ! ArrayList list = getChildrenOfType(RUBY_PROJECT); IRubyProject[] array = new IRubyProject[list.size()]; list.toArray(array); Index: RubyProjectElementInfo.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyProjectElementInfo.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RubyProjectElementInfo.java 13 Dec 2005 19:58:55 -0000 1.3 --- RubyProjectElementInfo.java 25 Mar 2006 02:27:36 -0000 1.4 *************** *** 117,121 **** /** ! * Returns an array of non-java resources contained in the receiver. */ Object[] getNonRubyResources(RubyProject project) { --- 117,121 ---- /** ! * Returns an array of non-ruby resources contained in the receiver. */ Object[] getNonRubyResources(RubyProject project) { Index: ModelUpdater.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/ModelUpdater.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ModelUpdater.java 13 Dec 2005 19:58:55 -0000 1.1 --- ModelUpdater.java 25 Mar 2006 02:27:36 -0000 1.2 *************** *** 70,74 **** int elementType = element.getElementType(); ! if (elementType == IRubyElement.PROJECT) { // project add is handled by RubyProject.configure() because // when a project is created, it does not yet have a java nature --- 70,74 ---- int elementType = element.getElementType(); ! if (elementType == IRubyElement.RUBY_PROJECT) { // project add is handled by RubyProject.configure() because // when a project is created, it does not yet have a java nature *************** *** 127,131 **** //RubyModelManager.getRubyModelManager().getIndexManager().reset(); break; ! case IRubyElement.PROJECT: RubyModelManager.getRubyModelManager().removePerProjectInfo((RubyProject) element); break; --- 127,131 ---- //RubyModelManager.getRubyModelManager().getIndexManager().reset(); break; ! case IRubyElement.RUBY_PROJECT: RubyModelManager.getRubyModelManager().removePerProjectInfo((RubyProject) element); break; *************** *** 193,197 **** Openable element = (Openable) delta.getElement(); switch (element.getElementType()) { ! case IRubyElement.PROJECT: project = (IRubyProject) element; break; --- 193,197 ---- Openable element = (Openable) delta.getElement(); switch (element.getElementType()) { ! case IRubyElement.RUBY_PROJECT: project = (IRubyProject) element; break; Index: RubyModelCache.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyModelCache.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RubyModelCache.java 2 Mar 2005 00:54:02 -0000 1.2 --- RubyModelCache.java 25 Mar 2006 02:27:36 -0000 1.3 *************** *** 77,81 **** case IRubyElement.RUBY_MODEL: return this.modelInfo; ! case IRubyElement.PROJECT: return this.projectCache.get(element); case IRubyElement.SCRIPT: --- 77,81 ---- case IRubyElement.RUBY_MODEL: return this.modelInfo; ! case IRubyElement.RUBY_PROJECT: return this.projectCache.get(element); case IRubyElement.SCRIPT: *************** *** 93,97 **** case IRubyElement.RUBY_MODEL: return this.modelInfo; ! case IRubyElement.PROJECT: return this.projectCache.get(element); case IRubyElement.SCRIPT: --- 93,97 ---- case IRubyElement.RUBY_MODEL: return this.modelInfo; ! case IRubyElement.RUBY_PROJECT: return this.projectCache.get(element); case IRubyElement.SCRIPT: *************** *** 110,114 **** this.modelInfo = (RubyModelInfo) info; break; ! case IRubyElement.PROJECT: this.projectCache.put(element, info); break; --- 110,114 ---- this.modelInfo = (RubyModelInfo) info; break; ! case IRubyElement.RUBY_PROJECT: this.projectCache.put(element, info); break; *************** *** 129,133 **** this.modelInfo = null; break; ! case IRubyElement.PROJECT: this.projectCache.remove(element); break; --- 129,133 ---- this.modelInfo = null; break; ! case IRubyElement.RUBY_PROJECT: this.projectCache.remove(element); break; Index: RubyImport.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyImport.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RubyImport.java 2 Mar 2005 00:54:02 -0000 1.2 --- RubyImport.java 25 Mar 2006 02:27:36 -0000 1.3 *************** *** 55,59 **** */ public int getElementType() { ! return IRubyElement.IMPORT; } --- 55,59 ---- */ public int getElementType() { ! return IRubyElement.IMPORT_DECLARATION; } Index: DeltaProcessor.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/DeltaProcessor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DeltaProcessor.java 13 Dec 2005 19:58:55 -0000 1.1 --- DeltaProcessor.java 25 Mar 2006 02:27:36 -0000 1.2 *************** *** 390,394 **** elementType = NON_RUBY_RESOURCE; } else { ! elementType = IRubyElement.PROJECT; } --- 390,394 ---- elementType = NON_RUBY_RESOURCE; } else { ! elementType = IRubyElement.RUBY_PROJECT; } *************** *** 485,489 **** currentDelta().addResourceDelta(delta); return; ! case IRubyElement.PROJECT: ((RubyProjectElementInfo) info).setNonRubyResources(null); break; --- 485,489 ---- currentDelta().addResourceDelta(delta); return; ! case IRubyElement.RUBY_PROJECT: ((RubyProjectElementInfo) info).setNonRubyResources(null); break; *************** *** 840,844 **** if (element == null) return false; contentChanged(element); ! } else if (elementType == IRubyElement.PROJECT) { if ((flags & IResourceDelta.OPEN) != 0) { // project has been opened or closed --- 840,844 ---- if (element == null) return false; contentChanged(element); ! } else if (elementType == IRubyElement.RUBY_PROJECT) { if ((flags & IResourceDelta.OPEN) != 0) { // project has been opened or closed *************** *** 924,928 **** switch (elementType) { ! case IRubyElement.PROJECT: // note that non-ruby resources rooted at the project level will --- 924,928 ---- switch (elementType) { ! case IRubyElement.RUBY_PROJECT: // note that non-ruby resources rooted at the project level will *************** *** 934,938 **** if (this.currentElement != null ! && this.currentElement.getElementType() == IRubyElement.PROJECT && ((IRubyProject) this.currentElement).getProject().equals(resource)) { return this.currentElement; } IProject proj = (IProject) resource; --- 934,938 ---- if (this.currentElement != null ! && this.currentElement.getElementType() == IRubyElement.RUBY_PROJECT && ((IRubyProject) this.currentElement).getProject().equals(resource)) { return this.currentElement; } IProject proj = (IProject) resource; *************** *** 983,987 **** int elementType = element.getElementType(); ! if (elementType == IRubyElement.PROJECT) { // project add is handled by RubyProject.configure() because // when a project is created, it does not yet have a java nature --- 983,987 ---- int elementType = element.getElementType(); ! if (elementType == IRubyElement.RUBY_PROJECT) { // project add is handled by RubyProject.configure() because // when a project is created, it does not yet have a java nature *************** *** 1053,1058 **** // create the moved from element ! Openable movedFromElement = elementType != IRubyElement.PROJECT ! && movedFromType == IRubyElement.PROJECT ? null : // outside // classpath this.createElement(movedFromRes, movedFromType); --- 1053,1058 ---- // create the moved from element ! Openable movedFromElement = elementType != IRubyElement.RUBY_PROJECT ! && movedFromType == IRubyElement.RUBY_PROJECT ? null : // outside // classpath this.createElement(movedFromRes, movedFromType); *************** *** 1131,1136 **** // create the moved To element ! Openable movedToElement = elementType != IRubyElement.PROJECT ! && movedToType == IRubyElement.PROJECT ? null : // outside // classpath this.createElement(movedToRes, movedToType); --- 1131,1136 ---- // create the moved To element ! Openable movedToElement = elementType != IRubyElement.RUBY_PROJECT ! && movedToType == IRubyElement.RUBY_PROJECT ? null : // outside // classpath this.createElement(movedToRes, movedToType); *************** *** 1144,1148 **** switch (elementType) { ! case IRubyElement.PROJECT: // refresh pkg fragment roots and caches of the project (and its --- 1144,1148 ---- switch (elementType) { ! case IRubyElement.RUBY_PROJECT: // refresh pkg fragment roots and caches of the project (and its *************** *** 1196,1203 **** // case of a movedTo or movedFrom project (other cases are handled // in processResourceDelta(...) ! return IRubyElement.PROJECT; case NON_RUBY_RESOURCE: ! case IRubyElement.PROJECT: if (res.getType() == IResource.FOLDER) { return NON_RUBY_RESOURCE; } String fileName = res.getName(); --- 1196,1203 ---- // case of a movedTo or movedFrom project (other cases are handled // in processResourceDelta(...) ! return IRubyElement.RUBY_PROJECT; case NON_RUBY_RESOURCE: ! case IRubyElement.RUBY_PROJECT: if (res.getType() == IResource.FOLDER) { return NON_RUBY_RESOURCE; } String fileName = res.getName(); |
|
From: Christopher W. <caw...@us...> - 2006-03-25 02:27:40
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6145/src/org/rubypeople/rdt/internal/core/parser Removed Files: Util.java Log Message: my initial working version of a Ruby Browsing Perspective --- Util.java DELETED --- |
|
From: Christopher W. <caw...@us...> - 2006-03-25 02:27:11
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/browsing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5764/src/org/rubypeople/rdt/internal/ui/browsing Log Message: Directory /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/browsing added to the repository |
|
From: Christopher W. <caw...@us...> - 2006-03-25 02:27:10
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/icons/full/eview16 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5764/icons/full/eview16 Log Message: Directory /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/icons/full/eview16 added to the repository |
|
From: Christopher W. <caw...@us...> - 2006-02-24 20:06:52
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1630/src/org/rubypeople/rdt/internal/ui/rubyeditor Modified Files: RubyEditor.java Log Message: hook in new go to matching bracket action Index: RubyEditor.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditor.java,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** RubyEditor.java 23 Feb 2006 21:52:05 -0000 1.38 --- RubyEditor.java 24 Feb 2006 20:06:47 -0000 1.39 *************** *** 30,35 **** --- 30,37 ---- import org.eclipse.jface.text.ITextSelection; import org.eclipse.jface.text.ITextViewerExtension; + import org.eclipse.jface.text.ITextViewerExtension5; import org.eclipse.jface.text.ITypedRegion; import org.eclipse.jface.text.Position; + import org.eclipse.jface.text.Region; import org.eclipse.jface.text.TextUtilities; import org.eclipse.jface.text.link.ILinkedModeListener; *************** *** 42,45 **** --- 44,48 ---- import org.eclipse.jface.text.source.Annotation; import org.eclipse.jface.text.source.IAnnotationModel; + import org.eclipse.jface.text.source.ICharacterPairMatcher; import org.eclipse.jface.text.source.ISourceViewer; import org.eclipse.jface.text.source.IVerticalRuler; *************** *** 83,86 **** --- 86,90 ---- import org.rubypeople.rdt.internal.ui.text.IRubyPartitions; import org.rubypeople.rdt.internal.ui.text.RubyHeuristicScanner; + import org.rubypeople.rdt.internal.ui.text.RubyPairMatcher; import org.rubypeople.rdt.internal.ui.text.Symbols; import org.rubypeople.rdt.ui.IWorkingCopyManager; *************** *** 94,97 **** --- 98,103 ---- public class RubyEditor extends RubyAbstractEditor { + protected final static char[] BRACKETS= { '{', '}', '(', ')', '[', ']' }; + protected RubyActionGroup actionGroup; private ProjectionSupport fProjectionSupport; *************** *** 126,129 **** --- 132,138 ---- */ private IMarker fLastMarkerTarget = null; + + /** The editor's bracket matcher */ + protected RubyPairMatcher fBracketMatcher= new RubyPairMatcher(BRACKETS); private BracketInserter fBracketInserter = new BracketInserter(); *************** *** 164,167 **** --- 173,180 ---- WorkbenchHelp.setHelp(action, IRubyHelpContextIds.TOGGLE_COMMENT_ACTION); configureToggleCommentAction(); + + action= new GotoMatchingBracketAction(this); + action.setActionDefinitionId(IRubyEditorActionDefinitionIds.GOTO_MATCHING_BRACKET); + setAction(GotoMatchingBracketAction.GOTO_MATCHING_BRACKET, action); action = new FormatAction(RubyUIMessages.getResourceBundle(), "Format.", this); *************** *** 176,180 **** beginRescueAction.update(selection); provider.addSelectionChangedListener(beginRescueAction); ! setAction("SurroundWithBeginRescue", beginRescueAction); //$NON-NLS-1$ actionGroup = new RubyActionGroup(this, ITextEditorActionConstants.GROUP_EDIT); --- 189,193 ---- beginRescueAction.update(selection); provider.addSelectionChangedListener(beginRescueAction); ! setAction(SurroundWithBeginRescueAction.SURROUND_WTH_BEGIN_RESCUE, beginRescueAction); actionGroup = new RubyActionGroup(this, ITextEditorActionConstants.GROUP_EDIT); *************** *** 1108,1110 **** --- 1121,1233 ---- return getElementAt(offset, true); } + + /** + * Jumps to the matching bracket. + */ + public void gotoMatchingBracket() { + + ISourceViewer sourceViewer= getSourceViewer(); + IDocument document= sourceViewer.getDocument(); + if (document == null) + return; + + IRegion selection= getSignedSelection(sourceViewer); + + int selectionLength= Math.abs(selection.getLength()); + if (selectionLength > 1) { + setStatusLineErrorMessage(RubyEditorMessages.GotoMatchingBracket_error_invalidSelection); + sourceViewer.getTextWidget().getDisplay().beep(); + return; + } + + // #26314 + int sourceCaretOffset= selection.getOffset() + selection.getLength(); + if (isSurroundedByBrackets(document, sourceCaretOffset)) + sourceCaretOffset -= selection.getLength(); + + IRegion region= fBracketMatcher.match(document, sourceCaretOffset); + if (region == null) { + setStatusLineErrorMessage(RubyEditorMessages.GotoMatchingBracket_error_noMatchingBracket); + sourceViewer.getTextWidget().getDisplay().beep(); + return; + } + + int offset= region.getOffset(); + int length= region.getLength(); + + if (length < 1) + return; + + int anchor= fBracketMatcher.getAnchor(); + // http://dev.eclipse.org/bugs/show_bug.cgi?id=34195 + int targetOffset= (ICharacterPairMatcher.RIGHT == anchor) ? offset + 1: offset + length; + + boolean visible= false; + if (sourceViewer instanceof ITextViewerExtension5) { + ITextViewerExtension5 extension= (ITextViewerExtension5) sourceViewer; + visible= (extension.modelOffset2WidgetOffset(targetOffset) > -1); + } else { + IRegion visibleRegion= sourceViewer.getVisibleRegion(); + // http://dev.eclipse.org/bugs/show_bug.cgi?id=34195 + visible= (targetOffset >= visibleRegion.getOffset() && targetOffset <= visibleRegion.getOffset() + visibleRegion.getLength()); + } + + if (!visible) { + setStatusLineErrorMessage(RubyEditorMessages.GotoMatchingBracket_error_bracketOutsideSelectedElement); + sourceViewer.getTextWidget().getDisplay().beep(); + return; + } + + if (selection.getLength() < 0) + targetOffset -= selection.getLength(); + + sourceViewer.setSelectedRange(targetOffset, selection.getLength()); + sourceViewer.revealRange(targetOffset, selection.getLength()); + } + + /** + * Returns the signed current selection. + * The length will be negative if the resulting selection + * is right-to-left (RtoL). + * <p> + * The selection offset is model based. + * </p> + * + * @param sourceViewer the source viewer + * @return a region denoting the current signed selection, for a resulting RtoL selections length is < 0 + */ + protected IRegion getSignedSelection(ISourceViewer sourceViewer) { + StyledText text= sourceViewer.getTextWidget(); + Point selection= text.getSelectionRange(); + + if (text.getCaretOffset() == selection.x) { + selection.x= selection.x + selection.y; + selection.y= -selection.y; + } + + selection.x= widgetOffset2ModelOffset(sourceViewer, selection.x); + + return new Region(selection.x, selection.y); + } + + private static boolean isSurroundedByBrackets(IDocument document, int offset) { + if (offset == 0 || offset == document.getLength()) + return false; + + try { + return + isBracket(document.getChar(offset - 1)) && + isBracket(document.getChar(offset)); + + } catch (BadLocationException e) { + return false; + } + } + + private static boolean isBracket(char character) { + for (int i= 0; i != BRACKETS.length; ++i) + if (character == BRACKETS[i]) + return true; + return false; + } } \ No newline at end of file |
|
From: Christopher W. <caw...@us...> - 2006-02-24 20:05:10
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv683/src/org/rubypeople/rdt/ui/actions Modified Files: SurroundWithBeginRescueAction.java Log Message: move over a constant string as an actual constant in class Index: SurroundWithBeginRescueAction.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/SurroundWithBeginRescueAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SurroundWithBeginRescueAction.java 10 Feb 2006 19:55:56 -0000 1.1 --- SurroundWithBeginRescueAction.java 24 Feb 2006 20:05:00 -0000 1.2 *************** *** 29,32 **** --- 29,33 ---- public class SurroundWithBeginRescueAction extends SelectionDispatchAction { + public static final String SURROUND_WTH_BEGIN_RESCUE = "SurroundWithBeginRescue"; //$NON-NLS-1$ private RubyEditor fEditor; |
|
From: Christopher W. <caw...@us...> - 2006-02-24 20:04:42
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv495/src/org/rubypeople/rdt/internal/ui/text Added Files: RubyPairMatcher.java Log Message: matches brackets --- NEW FILE: RubyPairMatcher.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.text; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.Region; import org.eclipse.jface.text.TextUtilities; import org.eclipse.jface.text.source.ICharacterPairMatcher; /** * Helper class for match pairs of characters. */ public class RubyPairMatcher implements ICharacterPairMatcher { protected char[] fPairs; protected IDocument fDocument; protected int fOffset; protected int fStartPos; protected int fEndPos; protected int fAnchor; public RubyPairMatcher(char[] pairs) { fPairs= pairs; } /* (non-Javadoc) * @see org.eclipse.jface.text.source.ICharacterPairMatcher#match(org.eclipse.jface.text.IDocument, int) */ public IRegion match(IDocument document, int offset) { fOffset= offset; if (fOffset < 0) return null; fDocument= document; if (fDocument != null && matchPairsAt() && fStartPos != fEndPos) return new Region(fStartPos, fEndPos - fStartPos + 1); return null; } /* (non-Javadoc) * @see org.eclipse.jface.text.source.ICharacterPairMatcher#getAnchor() */ public int getAnchor() { return fAnchor; } /* (non-Javadoc) * @see org.eclipse.jface.text.source.ICharacterPairMatcher#dispose() */ public void dispose() { clear(); fDocument= null; } /* * @see org.eclipse.jface.text.source.ICharacterPairMatcher#clear() */ public void clear() { } protected boolean matchPairsAt() { int i; int pairIndex1= fPairs.length; int pairIndex2= fPairs.length; fStartPos= -1; fEndPos= -1; // get the char preceding the start position try { char prevChar= fDocument.getChar(Math.max(fOffset - 1, 0)); // search for opening peer character next to the activation point for (i= 0; i < fPairs.length; i= i + 2) { if (prevChar == fPairs[i]) { fStartPos= fOffset - 1; pairIndex1= i; } } // search for closing peer character next to the activation point for (i= 1; i < fPairs.length; i= i + 2) { if (prevChar == fPairs[i]) { fEndPos= fOffset - 1; pairIndex2= i; } } if (fEndPos > -1) { fAnchor= RIGHT; fStartPos= searchForOpeningPeer(fEndPos, fPairs[pairIndex2 - 1], fPairs[pairIndex2], fDocument); if (fStartPos > -1) return true; else fEndPos= -1; } else if (fStartPos > -1) { fAnchor= LEFT; fEndPos= searchForClosingPeer(fStartPos, fPairs[pairIndex1], fPairs[pairIndex1 + 1], fDocument); if (fEndPos > -1) return true; else fStartPos= -1; } } catch (BadLocationException x) { } return false; } protected int searchForClosingPeer(int offset, char openingPeer, char closingPeer, IDocument document) throws BadLocationException { RubyHeuristicScanner scanner= new RubyHeuristicScanner(document, IRubyPartitions.RUBY_PARTITIONING, TextUtilities.getContentType(document, IRubyPartitions.RUBY_PARTITIONING, offset, false)); return scanner.findClosingPeer(offset + 1, openingPeer, closingPeer); } protected int searchForOpeningPeer(int offset, char openingPeer, char closingPeer, IDocument document) throws BadLocationException { RubyHeuristicScanner scanner= new RubyHeuristicScanner(document, IRubyPartitions.RUBY_PARTITIONING, TextUtilities.getContentType(document, IRubyPartitions.RUBY_PARTITIONING, offset, false)); int peer= scanner.findOpeningPeer(offset - 1, openingPeer, closingPeer); if (peer == RubyHeuristicScanner.NOT_FOUND) return -1; return peer; } } |
|
From: Christopher W. <caw...@us...> - 2006-02-24 20:04:27
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv451/src/org/rubypeople/rdt/internal/ui/rubyeditor Modified Files: RubyEditorActionContributor.java Log Message: add in go to matching bracket action Index: RubyEditorActionContributor.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorActionContributor.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** RubyEditorActionContributor.java 10 Feb 2006 20:14:31 -0000 1.10 --- RubyEditorActionContributor.java 24 Feb 2006 20:04:22 -0000 1.11 *************** *** 1,4 **** --- 1,7 ---- package org.rubypeople.rdt.internal.ui.rubyeditor; + import java.util.ResourceBundle; + + import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.Separator; *************** *** 8,13 **** --- 11,19 ---- import org.eclipse.ui.texteditor.BasicTextEditorActionContributor; import org.eclipse.ui.texteditor.ITextEditor; + import org.eclipse.ui.texteditor.ITextEditorActionConstants; + import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds; import org.eclipse.ui.texteditor.RetargetTextEditorAction; import org.rubypeople.rdt.internal.ui.RubyUIMessages; + import org.rubypeople.rdt.ui.actions.IRubyEditorActionDefinitionIds; import org.rubypeople.rdt.ui.actions.RubyActionIds; *************** *** 15,24 **** --- 21,36 ---- protected RetargetTextEditorAction contentAssistProposal; + private RetargetTextEditorAction fGotoMatchingBracket; public RubyEditorActionContributor() { super(); + ResourceBundle b = RubyEditorMessages.getBundleForConstructedKeys(); contentAssistProposal = new RetargetTextEditorAction(RubyUIMessages.getResourceBundle(), "ContentAssistProposal."); + fGotoMatchingBracket = new RetargetTextEditorAction(b, "GotoMatchingBracket."); //$NON-NLS-1$ + fGotoMatchingBracket + .setActionDefinitionId(IRubyEditorActionDefinitionIds.GOTO_MATCHING_BRACKET); + } *************** *** 29,32 **** --- 41,50 ---- editMenu.add(contentAssistProposal); } + + IMenuManager gotoMenu= menuManager.findMenuUsingPath("navigate/goTo"); //$NON-NLS-1$ + if (gotoMenu != null) { + gotoMenu.add(new Separator("additions2")); //$NON-NLS-1$ + gotoMenu.appendToGroup("additions2", fGotoMatchingBracket); //$NON-NLS-1$ + } } *************** *** 34,45 **** super.setActiveEditor(part); ! ITextEditor editor = null; ! if (part instanceof ITextEditor) editor = (ITextEditor) part; ! contentAssistProposal.setAction(getAction(editor, "ContentAssistProposal")); ! IActionBars bars = getActionBars(); ! bars.setGlobalActionHandler(RubyActionIds.COMMENT, getAction(editor, "Comment")); ! bars.setGlobalActionHandler(RubyActionIds.UNCOMMENT, getAction(editor, "Uncomment")); } } --- 52,76 ---- super.setActiveEditor(part); ! ITextEditor textEditor = null; ! if (part instanceof ITextEditor) textEditor = (ITextEditor) part; ! contentAssistProposal.setAction(getAction(textEditor, "ContentAssistProposal")); ! fGotoMatchingBracket.setAction(getAction(textEditor, ! GotoMatchingBracketAction.GOTO_MATCHING_BRACKET)); ! IActionBars actionBars = getActionBars(); ! actionBars.setGlobalActionHandler(RubyActionIds.COMMENT, getAction(textEditor, "Comment")); ! actionBars.setGlobalActionHandler(RubyActionIds.UNCOMMENT, getAction(textEditor, ! "Uncomment")); ! ! /** The global actions to be connected with editor actions */ ! IAction action = getAction(textEditor, ITextEditorActionConstants.NEXT); ! actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_NEXT_ANNOTATION, ! action); ! actionBars.setGlobalActionHandler(ITextEditorActionConstants.NEXT, action); ! action = getAction(textEditor, ITextEditorActionConstants.PREVIOUS); ! actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_PREVIOUS_ANNOTATION, ! action); ! actionBars.setGlobalActionHandler(ITextEditorActionConstants.PREVIOUS, action); } } |
|
From: Christopher W. <caw...@us...> - 2006-02-24 20:04:05
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32634/src/org/rubypeople/rdt/internal/ui/rubyeditor Modified Files: RubyEditorMessages.java Log Message: add strings for new go to matching bracket action Index: RubyEditorMessages.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RubyEditorMessages.java 10 Feb 2006 19:57:28 -0000 1.4 --- RubyEditorMessages.java 24 Feb 2006 20:03:58 -0000 1.5 *************** *** 28,31 **** --- 28,35 ---- public static String RubyOutlinePage_GoIntoTopLevelType_description; public static String RubyOutlinePage_error_NoTopLevelType; + public static String GotoMatchingBracket_label; + public static String GotoMatchingBracket_error_bracketOutsideSelectedElement; + public static String GotoMatchingBracket_error_invalidSelection; + public static String GotoMatchingBracket_error_noMatchingBracket; private static ResourceBundle fgResourceBundle = ResourceBundle.getBundle(BUNDLE_NAME); |
|
From: Christopher W. <caw...@us...> - 2006-02-24 20:03:51
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32589/src/org/rubypeople/rdt/internal/ui/rubyeditor Modified Files: RubyEditorMessages.properties Log Message: remove a lot of unused strings, add/modify ones for new go to matching bracket action Index: RubyEditorMessages.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.properties,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RubyEditorMessages.properties 10 Feb 2006 19:57:28 -0000 1.5 --- RubyEditorMessages.properties 24 Feb 2006 20:03:43 -0000 1.6 *************** *** 183,221 **** ExpandSelectionMenu.label=E&xpand Selection To ! GotoNextMember.label= N&ext Member ! GotoNextMember.tooltip=Move the Caret to the Next Member of the Compilation Unit ! GotoNextMember.description=Move the caret to the next member of the compilation unit ! ! GotoPreviousMember.label= Previ&ous Member ! GotoPreviousMember.tooltip=Move the Caret to the Previous Member of the Compilation Unit ! GotoPreviousMember.description=Move the caret to the previous member of the compilation unit ! ! GotoMatchingBracket.label= Matching &Bracket ! GotoMatchingBracket.tooltip=Go to Matching Bracket ! GotoMatchingBracket.description=Go to Matching Bracket ! GotoMatchingBracket.error.invalidSelection=No bracket selected ! GotoMatchingBracket.error.noMatchingBracket=No matching bracket found ! GotoMatchingBracket.error.bracketOutsideSelectedElement=Matching bracket is outside the selected element ! ! SourceAttachmentForm.title=Class File Editor ! SourceAttachmentForm.heading=Source not found ! SourceAttachmentForm.message.noSource=There is no source file attached to the class file {0}. ! SourceAttachmentForm.message.noSourceAttachment=The jar file {0} has no source attachment. ! SourceAttachmentForm.message.pressButtonToAttach=You can attach the source by clicking Attach Source below: ! SourceAttachmentForm.message.noSourceInAttachment=The source attachment does not contain the source for the file {0}. ! SourceAttachmentForm.message.pressButtonToChange=You can change the source attachment by clicking Change Attached Source below: ! SourceAttachmentForm.button.attachSource=&Attach Source... ! SourceAttachmentForm.button.changeAttachedSource=&Change Attached Source... ! SourceAttachmentForm.error.title=Error Opening Source Attachment Form ! SourceAttachmentForm.error.message=An error occurred while opening the source attachment form ! SourceAttachmentForm.attach.error.title=Error Attaching Source ! SourceAttachmentForm.attach.error.message=An error occurred while applying the source attachment ! ! SourceAttachmentForm.message.containerEntry=The JAR of this classfile belongs to the container ''{0}''.\nTo configure the source attachment, go directly to the corresponding configuration page\n(For example for JREs go to ''Installed JREs'' page in preferences). ! ! ! SourceAttachmentDialog.title=Attachments For ''{0}'' ! SourceAttachmentDialog.error.title=Error Attaching Source ! SourceAttachmentDialog.error.message=An error occurred while associating the source RubySelectAnnotationRulerAction.QuickFix.label= &Quick Fix --- 183,192 ---- ExpandSelectionMenu.label=E&xpand Selection To ! GotoMatchingBracket_label= Matching &Bracket ! GotoMatchingBracket_tooltip=Go to Matching Bracket ! GotoMatchingBracket_description=Go to Matching Bracket ! GotoMatchingBracket_error_invalidSelection=No bracket selected ! GotoMatchingBracket_error_noMatchingBracket=No matching bracket found ! GotoMatchingBracket_error_bracketOutsideSelectedElement=Matching bracket is outside the selected element RubySelectAnnotationRulerAction.QuickFix.label= &Quick Fix *************** *** 243,296 **** Indent.label=Correct &Indentation Indent.tooltip=&Indent Current Line to Correct Indentation - Indent.description=&Indents the current line or selection depending on surrounding source code - - OverrideIndicatorManager.implements= implements {0} - OverrideIndicatorManager.intallJob= Override indicator installation job - OverrideIndicatorManager.overrides= overrides {0} - OverrideIndicatorManager.open.error.title= Open Declaring Method - OverrideIndicatorManager.open.error.message= Could not open the super implementation. - OverrideIndicatorManager.open.error.messageHasLogEntry= Could not open the super implementation.\nSee the Error Log for details. - - SemanticHighlighting.job= Semantic Highlighting Job - SemanticHighlighting.field= Fields - SemanticHighlighting.staticField= Static fields - SemanticHighlighting.staticFinalField= Constants - SemanticHighlighting.methodDeclaration= Method declarations - SemanticHighlighting.staticMethodInvocation= Static method invocations - SemanticHighlighting.annotationElementReference= Annotation element references - SemanticHighlighting.abstractMethodInvocation= Abstract method invocations - SemanticHighlighting.inheritedMethodInvocation= Inherited method invocations - SemanticHighlighting.localVariableDeclaration= Local variable declarations - SemanticHighlighting.localVariable= Local variable references - SemanticHighlighting.parameterVariable= Parameter variables - SemanticHighlighting.deprecatedMember= Deprecated members - SemanticHighlighting.typeVariables= Type variables - SemanticHighlighting.method= Methods - SemanticHighlighting.autoboxing= Auto(un)boxed expressions - - FoldingMenu.label= Folding - - RubyEditor.markOccurrences.job.name= Occurrences Marker - - Editor.ChangeEncodingAction.label= Set Encodin&g... - Editor.ChangeEncodingAction.tooltip= Set Encoding - Editor.ChangeEncodingAction.image= - Editor.ChangeEncodingAction.description= Set Encoding - Editor.ChangeEncodingAction.dialog.title= Set Encoding - - Editor.ConvertLineDelimiters.label=C&onvert Line Delimiters To - - Editor.ConvertToWindows.label=&Windows - Editor.ConvertToWindows.tooltip=Converts Line Delimiters to Windows - Editor.ConvertToWindows.image= - Editor.ConvertToWindows.description=Converts line delimiters to Windows - - Editor.ConvertToUNIX.label=&UNIX - Editor.ConvertToUNIX.tooltip=Converts Line Delimiters to UNIX - Editor.ConvertToUNIX.image= - Editor.ConvertToUNIX.description=Converts line delimiters to UNIX - - Editor.ConvertToMac.label=&Mac - Editor.ConvertToMac.tooltip=Converts line delimiters to Mac - Editor.ConvertToMac.image= - Editor.ConvertToMac.description=Converts line delimiters to Mac --- 214,215 ---- |
|
From: Christopher W. <caw...@us...> - 2006-02-24 20:03:29
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32518/src/org/rubypeople/rdt/internal/ui/rubyeditor Added Files: GotoMatchingBracketAction.java Log Message: the new go to matching braket action implementation --- NEW FILE: GotoMatchingBracketAction.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.rubyeditor; import org.eclipse.jface.action.Action; import org.eclipse.jface.text.Assert; import org.eclipse.ui.PlatformUI; import org.rubypeople.rdt.internal.ui.IRubyHelpContextIds; public class GotoMatchingBracketAction extends Action { public final static String GOTO_MATCHING_BRACKET= "GotoMatchingBracket"; //$NON-NLS-1$ private final RubyEditor fEditor; public GotoMatchingBracketAction(RubyEditor editor) { super(RubyEditorMessages.GotoMatchingBracket_label); Assert.isNotNull(editor); fEditor= editor; setEnabled(true); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IRubyHelpContextIds.GOTO_MATCHING_BRACKET_ACTION); } public void run() { fEditor.gotoMatchingBracket(); } } |
|
From: Christopher W. <caw...@us...> - 2006-02-24 20:02:50
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32204 Modified Files: plugin.properties plugin.xml Log Message: add command and keybinding for new "go to matching bracket" action Index: plugin.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/plugin.properties,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** plugin.properties 10 Feb 2006 20:17:19 -0000 1.27 --- plugin.properties 24 Feb 2006 20:02:46 -0000 1.28 *************** *** 73,76 **** --- 73,79 ---- ActionDefinition.generateRdoc.description=Generate RDoc + ActionDefinition.gotoMatchingBracket.name= Go to Matching Bracket + ActionDefinition.gotoMatchingBracket.description= Moves the cursor to the matching bracket + 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.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** plugin.xml 18 Feb 2006 16:53:51 -0000 1.73 --- plugin.xml 24 Feb 2006 20:02:46 -0000 1.74 *************** *** 228,231 **** --- 228,236 ---- platform="carbon"> </key> + <key + sequence="M1+M2+P" + contextId="org.rubypeople.rdt.ui.rubyEditorScope" + commandId="org.rubypeople.rdt.ui.edit.text.ruby.goto.matching.bracket" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> </extension> <extension point="org.eclipse.ui.commands"> *************** *** 302,305 **** --- 307,316 ---- name="%ActionDefinition.generateRdoc.name"> </command> + <command + categoryId="org.eclipse.ui.category.navigate" + description="%ActionDefinition.gotoMatchingBracket.description" + id="org.rubypeople.rdt.ui.edit.text.ruby.goto.matching.bracket" + name="%ActionDefinition.gotoMatchingBracket.name"> + </command> </extension> <extension |
|
From: Christopher W. <caw...@us...> - 2006-02-24 20:02:29
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32120/src/org/rubypeople/rdt/ui/actions Modified Files: IRubyEditorActionDefinitionIds.java Log Message: add id for "Go to Matching bracket" Index: IRubyEditorActionDefinitionIds.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/IRubyEditorActionDefinitionIds.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IRubyEditorActionDefinitionIds.java 10 Feb 2006 19:56:08 -0000 1.3 --- IRubyEditorActionDefinitionIds.java 24 Feb 2006 20:02:25 -0000 1.4 *************** *** 35,37 **** --- 35,46 ---- public static final String SURROUND_WITH_BEGIN_RESCUE = "org.rubypeople.rdt.ui.edit.text.ruby.surround.with.begin.rescue"; //$NON-NLS-1$ + /** + * Action definition ID of the edit -> go to matching bracket action + * (value <code>"org.rubypeople.rdt.ui.edit.text.ruby.goto.matching.bracket"</code>). + * + * @since 0.8.0 + */ + public static final String GOTO_MATCHING_BRACKET= "org.rubypeople.rdt.ui.edit.text.ruby.goto.matching.bracket"; //$NON-NLS-1$ + + } |
|
From: Christopher W. <caw...@us...> - 2006-02-24 20:02:07
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31752/src/org/rubypeople/rdt/internal/ui/actions Modified Files: ActionMessages.properties Log Message: remove a bunch of unused strings Index: ActionMessages.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/ActionMessages.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ActionMessages.properties 10 Feb 2006 19:58:29 -0000 1.1 --- ActionMessages.properties 24 Feb 2006 20:01:58 -0000 1.2 *************** *** 11,273 **** ############################################################################### - OpenWithMenu_label=Open Wit&h - RefactorMenu_label=Refac&tor - SourceMenu_label=&Source - BuildPath_label=&Build Path - - BuildAction_label=&Build Project - RebuildAction_label=Rebuild Pro&ject - - SelectionConverter_codeResolveOrInput_failed=Could not convert text selection into a Java element - SelectionConverter_codeResolve_failed=Could not convert text selection into a Java element - - OpenAction_label=&Open - OpenAction_tooltip=Open an Editor on the Selected Element - OpenAction_description=Open an editor on the selected element - OpenAction_declaration_label=&Open Declaration - OpenAction_select_element=&Select or enter the element to open: - - OpenAction_error_title=Open - OpenAction_error_message=Cannot open default editor. - OpenAction_error_messageArgs=Cannot open default editor on {0}. {1} - OpenAction_error_messageProblems=Problems Opening Editor - OpenAction_error_messageBadSelection=Current text selection does not resolve to a Java element - - OpenSuperImplementationAction_label=Open S&uper Implementation - OpenSuperImplementationAction_tooltip=Open the Implementation in the Super Type - OpenSuperImplementationAction_description=Open the Implementation in the Super Type - OpenSuperImplementationAction_error_title=Open Super Implementation - OpenSuperImplementationAction_error_message=Opening the super implementation failed. Check log for details. - OpenSuperImplementationAction_not_applicable=The operation is not applicable to the current selection. Select an overriding method. - OpenSuperImplementationAction_no_super_implementation=The super implementation of method ''{0}'' does not exist. - - OpenTypeHierarchyAction_label=Open Type Hi&erarchy - OpenNewClassWizardAction_text=Class - OpenNewEnumWizardAction_text=Enum - OpenTypeHierarchyAction_tooltip=Open a Type Hierarchy on the Selected Element - OpenTypeHierarchyAction_description=Open a type hierarchy on the selected element - OpenTypeHierarchyAction_dialog_title=Open Type Hierarchy - OpenTypeHierarchyAction_messages_title=Cannot create type hierarchy - OpenTypeHierarchyAction_messages_no_java_element=A Java element must be selected. - OpenTypeHierarchyAction_messages_no_java_resources=The selected package does not contain any Java resource. - OpenTypeHierarchyAction_messages_no_types=The selected compilation unit does not contain a type. - OpenNewAnnotationWizardAction_description=Opens the new annotation type wizard - OpenNewJavaProjectWizardAction_description=Opens the new Java project wizard - OpenNewSourceFolderWizardAction_description=Opens the new Java source folder wizard - OpenNewInterfaceWizardAction_description=Opens the new interface wizard - OpenTypeHierarchyAction_messages_no_valid_java_element=A valid Java element must be selected. - OpenTypeHierarchyAction_messages_unknown_import_decl=The selected import declaration can not be resolved. - - ShowInPackageViewAction_label=Show in Pac&kage Explorer - ShowInPackageViewAction_description=Show the selected element in Package Explorer - ShowInPackageViewAction_tooltip=Show in Package Explorer - ShowInPackageViewAction_dialog_title=Show In Package Explorer - ShowInPackageViewAction_error_message=An internal error occurred. Please see log for details. - - ShowInNavigatorView_label=Show in &Navigator View - ShowInNavigatorView_dialog_title=Show in Navigator View - ShowInNavigatorView_dialog_message=Select the element to be opened in the navigator view: - ShowInNavigatorView_error_activation_failed=Cannot activate Resource Navigator - - OverrideMethodsAction_label=O&verride/Implement Methods... - OverrideMethodsAction_description=Override or Implement Methods from super types. - OverrideMethodsAction_tooltip=Override/Implement Methods - OverrideMethodsAction_error_actionfailed=Cannot create methods - - OverrideMethodsAction_error_title=Override/Implement Methods - OverrideMethodsAction_error_nothing_found=No methods to override found for this type. - OverrideMethodsAction_error_type_removed_in_editor=Input type has been removed in editor. - OverrideMethodsAction_not_applicable=The operation is not applicable to the current selection. Select a class. - OverrideMethodsAction_interface_not_applicable=The Override Methods operation is not applicable to interfaces. - OverrideMethodsAction_annotation_not_applicable=The Override Methods operation is not applicable to annotations. - - AddGetterSetterAction_label=Gene&rate Getters and Setters... - AddGetterSetterAction_description=Generate Getter and Setter methods for type's fields - AddGetterSetterAction_tooltip=Generate Getter and Setter Methods for the Type's Fields - - AddGetterSetterAction_error_duplicate_methods=Possible duplicate method(s) selected - AddGetterSetterAction_no_primary_type_title=Add Setter and Getter - AddGetterSetterAction_no_primary_type_message=No primary type found. - AddGetterSetterAction_error_title=Generate Getters and Setters - AddGetterSetterAction_error_actionfailed=Generating Getters and Setters Failed. - AddGetterSetterAction_not_applicable=The operation is not applicable to the current selection. Select a field which is not declared as type variable or a type that declares such fields. - AddGetterSetterAction_interface_not_applicable=The Generate Getters and Setters operation is not applicable to interfaces. - AddGetterSetterAction_annotation_not_applicable=The Generate Getters and Setters operation is not applicable to annotations. - - AddGetterSetterAction_QueryDialog_title=Generate Getters and Setters - AddGetterSetterAction_SkipSetterForFinalDialog_message=Field ''{0}'' is final.\nDo you want to skip the creation of the setter method? - AddGetterSetterAction_SkipExistingDialog_message=Method ''{0}'' already exists.\nSkip creation? - AddGetterSetterAction_SkipExistingDialog_skip_label=&Skip - AddGetterSetterAction_SkipExistingDialog_replace_label=&Replace - AddGetterSetterAction_SkipExistingDialog_skipAll_label=Skip &All - - AddGetterSetterAction_dialog_label=&Select getters and setters to create: - AddGetterSetterAction_methods_selected={0} of {1} selected. - AddGettSetterAction_typeContainsNoFields_message=The type contains no fields or all fields have getters/setters already. - - GetterSetterTreeSelectionDialog_select_getters=Select &Getters - GetterSetterTreeSelectionDialog_select_setters=Se&lect Setters - GetterSetterTreeSelectionDialog_alpha_pair_sort=Fields in getter/setter pairs - GetterSetterTreeSelectionDialog_alpha_method_sort=First getters, then setters - GetterSetterTreeSelectionDialog_sort_label=S&ort by: - - SourceActionDialog_enterAt_label=&Insertion point: - SourceActionDialog_modifier_group=Access modifier - SourceActionDialog_modifier_public=&public - SourceActionDialog_modifier_protected=protec&ted - SourceActionDialog_modifier_default=d&efault - SourceActionDialog_modifier_private=pri&vate - SourceActionDialog_modifier_synchronized=s&ynchronized - SourceActionDialog_modifier_final=&final - SourceActionDialog_first_method=First method - SourceActionDialog_last_method=Last method - SourceActionDialog_cursor=Cursor position - SourceActionDialog_after=After ''{0}'' - SourceActionDialog_createMethodComment=Generate method &comments - SourceActionDialog_createMethodAnnotation=Generate '@Override' a&nnotations - SourceActionDialog_no_entries=No methods available. - SourceActionDialog_createConstructorComment=Generate constructor &comments - - AddUnimplementedConstructorsAction_label=Add &Constructors from Superclass... - AddUnimplementedConstructorsAction_description=Add constructors from superclass - AddUnimplementedConstructorsAction_tooltip=Add Constructors from Superclass - AddUnimplementedConstructorsAction_error_title=Add Constructors from Superclass - AddUnimplementedConstructorsAction_error_type_removed_in_editor=Input type has been removed in editor. - AddUnimplementedConstructorsAction_not_applicable=The operation is not applicable to the current selection. Select a class. - AddUnimplementedConstructorsAction_interface_not_applicable=The Add Constructors from Superclass operation is not applicable to interfaces. - AddUnimplementedConstructorsAction_enum_not_applicable=The Add Constructors from Superclass operation is not applicable to enums. - AddUnimplementedConstructorsAction_annotation_not_applicable=The Add Constructors from Superclass operation is not applicable to annotations. - AddUnimplementedConstructorsAction_methods_selected={0} of {1} selected. - AddUnimplementedConstructorsAction_error_nothing_found=There are no constructors from the superclass which may be added. - AddUnimplementedConstructorsAction_dialog_title=Add Constructors from Superclass - AddUnimplementedConstructorsAction_dialog_label=&Select constructors to implement: - - AddUnimplementedConstructorsDialog_omit_super=&Omit call to default constructor super() - - GenerateConstructorUsingFieldsAction_label=Generate C&onstructor using Fields... - GenerateConstructorUsingFieldsAction_description=Generate Constructor using fields - GenerateConstructorUsingFieldsAction_tooltip=Generate Constructor Using Fields - GenerateConstructorUsingFieldsAction_error_title=Generate Constructor using Fields - GenerateConstructorUsingFieldsAction_not_applicable=The operation is not applicable to the current selection. Select a class. - GenerateConstructorUsingFieldsAction_fields_selected={0} of {1} selected. - GenerateConstructorUsingFieldsAction_error_duplicate_constructor=The constructor to be created is possibly a duplicate - GenerateConstructorUsingFieldsAction_error_nothing_found=There are no constructors from the superclass which may be used. - GenerateConstructorUsingFieldsAction_dialog_title=Generate Constructor using Fields - GenerateConstructorUsingFieldsAction_dialog_label=&Select fields to initialize: - GenerateConstructorUsingFieldsAction_interface_not_applicable=The Generate Constructor using Fields operation is not applicable to interfaces. - GenerateConstructorUsingFieldsAction_enum_not_applicable=The Generate Constructor using Fields operation is not applicable to enums. - GenerateConstructorUsingFieldsAction_annotation_not_applicable=The Generate Constructor using Fields operation is not applicable to annotations. - GenerateConstructorUsingFieldsAction_typeContainsNoFields_message=The type contains no fields which may be set. - GenerateConstructorUsingFieldsAction_error_actionfailed=Unexpected error while creating constructors. See log for details. - GenerateConstructorUsingFieldsAction_error_anonymous_class=Anonymous classes cannot contain explicitely declared constructors. - - GenerateConstructorUsingFieldsSelectionDialog_up_button=&Up - GenerateConstructorUsingFieldsSelectionDialog_down_button=Do&wn - GenerateConstructorUsingFieldsSelectionDialog_sort_constructor_choices_label=Select super constructor to invo&ke: - GenerateConstructorUsingFieldsSelectionDialog_omit_super=&Omit call to default constructor super() - - - AddJavaDocStubAction_label=Add Commen&t - AddJavaDocStubAction_description=Add a comment stub to the member element - AddJavaDocStubAction_tooltip=Add a Comment Stub to the Member Element - - AddJavaDocStubsAction_error_dialogTitle=Add Comment - AddJavaDocStubsAction_error_actionFailed=Error while adding comment - AddJavaDocStubsAction_not_applicable=The operation is not applicable to the current selection. Select a type or method. - - ExternalizeStringsAction_label= &Externalize Strings... - ExternalizeStringsAction_dialog_title= Externalize Strings - ExternalizeStringsAction_dialog_message=Could not open Externalize String Wizard - - FindStringsToExternalizeAction_label= Find Strings to Externali&ze... - FindStringsToExternalizeAction_dialog_title= Find Strings to Externalize - FindStringsToExternalizeAction_error_message= Unexpected Exception. See log. - FindStringsToExternalizeAction_error_cannotBeParsed= Compilation unit ''{0}'' can not be parsed. - FindStringsToExternalizeAction_foundStrings= {0} in {1} - FindStringsToExternalizeAction_noStrings= No non-externalized strings found. - FindStringsToExternalizeAction_non_externalized= {0} &non-externalized string(s) found. - FindStringsToExternalizeAction_button_label= &Externalize... - FindStringsToExternalizeAction_find_strings= Finding non-externalized strings... - - OpenExternalJavadocAction_label=Open E&xternal Javadoc - OpenExternalJavadocAction_description=Opens the Javadoc of the selected element in an external browser - OpenExternalJavadocAction_tooltip=Opens the Javadoc of the Selected Element in an External Browser - OpenExternalJavadocAction_select_element=&Select or enter the element to open: - OpenExternalJavadocAction_libraries_no_location=The documentation location for ''{0}'' has not been configured. For elements from libraries specify the Javadoc location URL on the properties page of the parent JAR (''{1}'') - OpenExternalJavadocAction_source_no_location=The documentation location for ''{0}'' has not been configured. For elements from source specify the Javadoc location URL on the properties page of the parent project (''{1}'') - OpenExternalJavadocAction_no_entry=The documentation does not contain an entry for ''{0}''.\n(File ''{1}'' does not exist.) - OpenExternalJavadocAction_opening_failed=Opening Javadoc failed. See log for details - OpenExternalJavadocAction_dialog_title=Open External Javadoc - OpenExternalJavadocAction_code_resolve_failed=Could not convert text selection into a Java element - - SelfEncapsulateFieldAction_label=Encap&sulate Field... - SelfEncapsulateFieldAction_dialog_title=Encapsulate Field - SelfEncapsulateFieldAction_dialog_unavailable=The operation is not applicable to the current selection. Select a field of a class or enum. - SelfEncapsulateFieldAction_dialog_cannot_perform=Cannot perform refactoring. See log for more details. - - OrganizeImportsAction_label=Or&ganize Imports - OrganizeImportsAction_tooltip=Evaluate All Required Imports and Replace the Current Imports - OrganizeImportsAction_description=Evaluate all required imports and replace the current imports - - CleanUpAction_label=Clean &Up... - CleanUpAction_tooltip=Solve Problems and Improve Code Style on Selected Resources - CleanUpAction_description=Solve problems and improve code style on selected resources - CleanUpAction_ErrorDialogTitle=Clean Up - CleanUpAction_MultiStateErrorTitle=Problems while cleaning up some compilation units. See 'Details' for more information. - CleanUpAction_UnexpectedErrorMessage={0}: Unexpected error. See log for details. - CleanUpAction_CUNotOnBuildpathMessage={0}: Compilation unit not on build path. No changes applied. - - OrganizeImportsAction_multi_op_description=Organizing imports... - OrganizeImportsAction_multi_error_parse={0}: Compilation unit has parse errors. No changes applied. - OrganizeImportsAction_multi_error_unresolvable={0}: Compilation unit contains ambiguous references. User interaction required. - OrganizeImportsAction_multi_error_unexpected={0}: Unexpected error. See log for details. - OrganizeImportsAction_multi_error_notoncp={0}: Compilation unit not on build path. No changes applied. - - OrganizeImportsAction_selectiondialog_title=Organize Imports - OrganizeImportsAction_selectiondialog_message=&Choose type to import: - - OrganizeImportsAction_error_title=Organize Imports - OrganizeImportsAction_error_message=Unexpected error in organize imports. See log for details. - - OrganizeImportsAction_single_error_parse=Compilation unit has parse errors: ''{0}''. No changes applied. - - OrganizeImportsAction_summary_added={0} import(s) added. - OrganizeImportsAction_summary_removed={0} import(s) removed. - - OrganizeImportsAction_multi_status_title=Organize Imports - OrganizeImportsAction_multi_status_description=Problems while organizing imports on some compilation units. See 'Details' for more information. - - FormatAllAction_label=Format - FormatAllAction_tooltip=Format all selected Java files - FormatAllAction_description=Format all selected Java files - FormatAllAction_status_description=Problems while formatting some compilation units. See 'Details' for more information. - FormatAllAction_multi_status_title=Format - FormatAllAction_error_title=Format - FormatAllAction_error_message=Unexpected error while formatting. See log for details. - - FormatAllAction_operation_description=Formatting... - FormatAllAction_failedvalidateedit_title=Format - FormatAllAction_failedvalidateedit_message=Problems while accessing selected files. - FormatAllAction_noundo_title=Format - FormatAllAction_noundo_message='Undo' is not supported by this operation. Do you want to continue? - - - SortMembersAction_label=Sort &Members - SortMembersAction_tooltip=Sorts all Members using the Member Order Preference - SortMembersAction_description=Sorts all members using the member order preference - SortMembersAction_dialog_title=Sort Members - - SortMembersAction_not_applicable=Operation not applicable to current text editor. - SortMembersAction_containsmarkers=Markers like bookmarks, breakpoints, or user defined tasks in a reordered member will be lost. OK to continue? - SortMembersAction_no_members=There are not enough members in this type to sort. - - OpenBrowserUtil_help_not_available=Help support not available - OpenNewAnnotationWizardAction_text=Annotation - OpenNewPackageWizardAction_tooltip=Opens the new Java package wizard - OpenNewClassWizardAction_tooltip=Opens the new class wizard - OpenNewInterfaceWizardAction_text=Interface - OpenNewEnumWizardAction_tooltip=Opens the new enum type wizard - OpenNewPackageWizardAction_text=Package - MemberFilterActionGroup_hide_fields_label=Hide Fiel&ds MemberFilterActionGroup_hide_fields_tooltip=Hide Fields --- 11,14 ---- *************** *** 286,379 **** MemberFilterActionGroup_hide_localtypes_description=Toggles the visibility of local types - - NewWizardsActionGroup_new=Ne&w - - OpenProjectAction_dialog_title=Open Project - OpenProjectAction_dialog_message=Select project(s) to be opened - OpenProjectAction_error_message=Problems while opening projects - - OpenJavaPerspectiveAction_dialog_title=Open Java Perspective - OpenJavaPerspectiveAction_error_open_failed=Could not open Java perspective - - OpenJavaBrowsingPerspectiveAction_dialog_title=Open Java Browsing Perspective - OpenJavaBrowsingPerspectiveAction_error_open_failed=Could not open Java browsing perspective - - OpenTypeInHierarchyAction_label=Open Type in Hierarchy... - OpenTypeInHierarchyAction_description=Open a type in a type hierarchy - - OpenTypeInHierarchyAction_tooltip=Open a Type in a Type Hierarchy - OpenTypeInHierarchyAction_dialogMessage=&Choose a type (? = any character, * = any string): - OpenTypeInHierarchyAction_dialogTitle=Open Type in Hierarchy - OpenNewAnnotationWizardAction_tooltip=Opens the new annotation type wizard - OpenNewJavaProjectWizardAction_tooltip=Opens the new Java project wizard - OpenNewPackageWizardAction_description=Opens the new Java package wizard - OpenNewSourceFolderWizardAction_tooltip=Opens the new Java source folder wizard - OpenNewClassWizardAction_description=Opens the new class wizard - OpenNewInterfaceWizardAction_tooltip=Opens the new interface wizard - OpenNewSourceFolderWizardAction_text=Source Folder - OpenNewEnumWizardAction_description=Opens the new enum type wizard - OpenNewJavaProjectWizardAction_text=Java Project - - RefreshAction_label= Re&fresh - RefreshAction_toolTip= Refresh - RefreshAction_progressMessage= Refreshing... - RefreshAction_error_title= Refresh Problems - RefreshAction_error_message= Problems occurred refreshing the selected resources. - RefreshAction_locationDeleted_title= Project location has been deleted - RefreshAction_locationDeleted_message= The location for project {0} ({1}) has been deleted.\n Delete {0} from the workspace? - - ModifyParameterAction_problem_title=Refactoring - ModifyParameterAction_problem_message=Cannot perform operation. - - ActionUtil_notOnBuildPath_title=Cannot Perform Operation - ActionUtil_notOnBuildPath_message=The resource is not on the build path of a Java project. - ActionUtil_notOnBuildPath_resource_message=The resource ''{0}'' is not on the build path of a Java project. - ActionUtil_not_possible=Cannot Perform Operation - ActionUtil_no_linked=This operation is unavailable on linked packages and package fragment roots. - - SelectAllAction_label= Select A&ll - SelectAllAction_tooltip= Select All - - AddToClasspathAction_label=Add to &Build Path - AddToClasspathAction_toolTip=Add JAR to the Java Build Path - AddToClasspathAction_progressMessage=Adding to build path... - AddToClasspathAction_error_title=Add to Build Path - AddToClasspathAction_error_message=Problems occurred while adding to the build path. - - RemoveFromClasspathAction_Remove=Remove from &Build Path - RemoveFromClasspathAction_tooltip=Remove Package Fragment Root from the Java Build Path - RemoveFromClasspathAction_Removing=Removing from build path... - RemoveFromClasspathAction_exception_dialog_title=Remove From Build Path - RemoveFromClasspathAction_Problems_occurred=Problems occurred while removing from the build path. - - AddDelegateMethodsAction_error_title=Generate Delegate Methods - AddDelegateMethodsAction_error_actionfailed=Generating delegate methods failed. - AddDelegateMethodsAction_label=Generate Delegate &Methods... - AddDelegateMethodsAction_description=Adds delegate methods for a type's fields - AddDelegateMethodsAction_tooltip=Adds Delegates Methods for a Type's Fields - AddDelegateMethodsAction_not_applicable=The operation is not applicable to the current selection. Select a field which is not declared as type variable or a type that declares such fields. - AddDelegateMethodsAction_annotation_not_applicable=The Generate Delegate Methods operation is not applicable to annotations. - AddDelegateMethodsAction_interface_not_applicable=The Generate Delegate Methods operation is not applicable to interfaces. - AddDelegateMethodsAction_duplicate_methods=Duplicate method(s) selected - - AddDelegateMethodsAction_title=Generate Delegate Methods - AddDelegateMethodsAction_message=Select &methods to create delegates for: - AddDelegateMethodsAction_selectioninfo_more={0} of {1} selected. - AddDelegateMethodsOperation_monitor_message=Adding delegate methods... - ToggleLinkingAction_label=Lin&k With Editor ToggleLinkingAction_tooltip=Link with Editor ToggleLinkingAction_description=Link with active editor - ConfigureContainerAction_error_title=Configure Classpath Container - ConfigureContainerAction_error_creationfailed_message=Configuration of the classpath container failed. - ConfigureContainerAction_error_applyingfailed_message=Application of the classpath container changes failed. - - FindExceptionOccurrences_text= Throwing E&xception - FindExceptionOccurrences_toolTip= Find All Occurrences Throwing this Exception - - FindImplementOccurrencesAction_text= I&mplementing Methods - FindImplementOccurrencesAction_toolTip= Find All Methods Implementing or Overriding the Selected Type - - # The first parameter is the menu text and the second parameter is the shortcut string - QuickMenuAction_menuTextWithShortcut= {0}\t{1} --- 27,32 ---- |
|
From: Christopher W. <caw...@us...> - 2006-02-24 20:01:51
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31685/src/org/rubypeople/rdt/internal/ui Removed Files: IUIConstants.java Log Message: remove unused interface --- IUIConstants.java DELETED --- |
|
From: Christopher W. <caw...@us...> - 2006-02-24 02:02:25
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24092/src/org/rubypeople/rdt/internal/ui/text/ruby Modified Files: RubyCompletionProcessor.java Log Message: jeez, I really have to remember to set target platform for eclipse. Fixing incompatibility with 3.1.x version of Eclipse. 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.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** RubyCompletionProcessor.java 18 Feb 2006 17:29:33 -0000 1.17 --- RubyCompletionProcessor.java 24 Feb 2006 02:02:20 -0000 1.18 *************** *** 20,24 **** import org.eclipse.jface.text.contentassist.IContextInformationPresenter; import org.eclipse.jface.text.contentassist.IContextInformationValidator; - import org.eclipse.jface.text.contentassist.TextContentAssistInvocationContext; import org.eclipse.jface.text.templates.Template; import org.eclipse.jface.text.templates.TemplateCompletionProcessor; --- 20,23 ---- *************** *** 228,245 **** /** - * Creates the context that is passed to the completion proposal computers. - * - * @param viewer - * the viewer that content assist is invoked on - * @param offset - * the content assist offset - * @return the context to be passed to the computers - */ - protected TextContentAssistInvocationContext createContext( - ITextViewer viewer, int offset) { - return new TextContentAssistInvocationContext(viewer, offset); - } - - /** * @return */ --- 227,230 ---- *************** *** 247,253 **** int documentOffset) { TemplateEngine engine = fRubyTemplateEngine; ! TextContentAssistInvocationContext context = createContext(viewer, ! documentOffset); ! if (engine != null) { IRubyScript unit = fManager --- 232,236 ---- int documentOffset) { TemplateEngine engine = fRubyTemplateEngine; ! if (engine != null) { IRubyScript unit = fManager *************** *** 257,261 **** engine.reset(); ! engine.complete(context.getViewer(), context.getInvocationOffset(), unit); --- 240,244 ---- engine.reset(); ! engine.complete(refViewer, documentOffset, unit); |
|
From: Markus B. <mba...@us...> - 2006-02-23 21:52:10
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1716/src/org/rubypeople/rdt/internal/ui/rubyeditor Modified Files: RubyEditor.java Log Message: restored getNextAnnotation, isNavigationTarget, gotoAnnotation Index: RubyEditor.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditor.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** RubyEditor.java 10 Feb 2006 20:14:31 -0000 1.37 --- RubyEditor.java 23 Feb 2006 21:52:05 -0000 1.38 *************** *** 14,17 **** --- 14,18 ---- import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Platform; + import org.eclipse.core.runtime.Preferences; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; *************** *** 63,67 **** --- 64,70 ---- import org.eclipse.ui.actions.ActionContext; import org.eclipse.ui.actions.ActionGroup; + import org.eclipse.ui.editors.text.EditorsUI; import org.eclipse.ui.help.WorkbenchHelp; + import org.eclipse.ui.texteditor.AnnotationPreference; import org.eclipse.ui.texteditor.ContentAssistAction; import org.eclipse.ui.texteditor.IEditorStatusLine; *************** *** 255,258 **** --- 258,385 ---- return null; } + + + /** + * Returns the annotation closest to the given range respecting the given + * direction. If an annotation is found, the annotations current position + * is copied into the provided annotation position. + * + * @param offset the region offset + * @param length the region length + * @param forward <code>true</code> for forwards, <code>false</code> for backward + * @param annotationPosition the position of the found annotation + * @return the found annotation + */ + private Annotation getNextAnnotation(final int offset, final int length, boolean forward, Position annotationPosition) { + + Annotation nextAnnotation= null; + Position nextAnnotationPosition= null; + Annotation containingAnnotation= null; + Position containingAnnotationPosition= null; + boolean currentAnnotation= false; + + IDocument document= getDocumentProvider().getDocument(getEditorInput()); + int endOfDocument= document.getLength(); + int distance= Integer.MAX_VALUE; + + IAnnotationModel model= getDocumentProvider().getAnnotationModel(getEditorInput()); + Iterator e= new RubyAnnotationIterator(model, true, true); + while (e.hasNext()) { + Annotation a= (Annotation) e.next(); + if ((a instanceof IRubyAnnotation) && ((IRubyAnnotation)a).hasOverlay() || !isNavigationTarget(a)) + continue; + + Position p= model.getPosition(a); + if (p == null) + continue; + + if (forward && p.offset == offset || !forward && p.offset + p.getLength() == offset + length) {// || p.includes(offset)) { + if (containingAnnotation == null || (forward && p.length >= containingAnnotationPosition.length || !forward && p.length >= containingAnnotationPosition.length)) { + containingAnnotation= a; + containingAnnotationPosition= p; + currentAnnotation= p.length == length; + } + } else { + int currentDistance= 0; + + if (forward) { + currentDistance= p.getOffset() - offset; + if (currentDistance < 0) + currentDistance= endOfDocument + currentDistance; + + if (currentDistance < distance || currentDistance == distance && p.length < nextAnnotationPosition.length) { + distance= currentDistance; + nextAnnotation= a; + nextAnnotationPosition= p; + } + } else { + currentDistance= offset + length - (p.getOffset() + p.length); + if (currentDistance < 0) + currentDistance= endOfDocument + currentDistance; + + if (currentDistance < distance || currentDistance == distance && p.length < nextAnnotationPosition.length) { + distance= currentDistance; + nextAnnotation= a; + nextAnnotationPosition= p; + } + } + } + } + if (containingAnnotationPosition != null && (!currentAnnotation || nextAnnotation == null)) { + annotationPosition.setOffset(containingAnnotationPosition.getOffset()); + annotationPosition.setLength(containingAnnotationPosition.getLength()); + return containingAnnotation; + } + if (nextAnnotationPosition != null) { + annotationPosition.setOffset(nextAnnotationPosition.getOffset()); + annotationPosition.setLength(nextAnnotationPosition.getLength()); + } + + return nextAnnotation; + } + + /** + * Returns whether the given annotation is configured as a target for the + * "Go to Next/Previous Annotation" actions + * + * @param annotation the annotation + * @return <code>true</code> if this is a target, <code>false</code> + * otherwise + * @since 3.0 + */ + private boolean isNavigationTarget(Annotation annotation) { + Preferences preferences= EditorsUI.getPluginPreferences(); + AnnotationPreference preference= getAnnotationPreferenceLookup().getAnnotationPreference(annotation); + // See bug 41689 + // String key= forward ? preference.getIsGoToNextNavigationTargetKey() : preference.getIsGoToPreviousNavigationTargetKey(); + String key= preference == null ? null : preference.getIsGoToNextNavigationTargetKey(); + return (key != null && preferences.getBoolean(key)); + } + + /** + * Jumps to the next enabled annotation according to the given direction. + * An annotation type is enabled if it is configured to be in the + * Next/Previous tool bar drop down menu and if it is checked. + * + * @param forward <code>true</code> if search direction is forward, <code>false</code> if backward + */ + public void gotoAnnotation(boolean forward) { + ITextSelection selection= (ITextSelection) getSelectionProvider().getSelection(); + Position position= new Position(0, 0); + if (false /* delayed - see bug 18316 */) { + getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position); + selectAndReveal(position.getOffset(), position.getLength()); + } else /* no delay - see bug 18316 */ { + Annotation annotation= getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position); + setStatusLineErrorMessage(null); + setStatusLineMessage(null); + if (annotation != null) { + updateAnnotationViews(annotation); + selectAndReveal(position.getOffset(), position.getLength()); + setStatusLineMessage(annotation.getText()); + } + } + } + /** |
|
From: Christopher W. <caw...@us...> - 2006-02-22 21:25:57
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13520/templates Modified Files: rdt.xml rdt.properties Log Message: add template for common "if currently executing script" code block (similar to a main method) Index: rdt.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/templates/rdt.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rdt.properties 26 Nov 2004 18:57:26 -0000 1.1 --- rdt.properties 22 Feb 2006 21:25:51 -0000 1.2 *************** *** 9,12 **** --- 9,13 ---- doTemplate1.description= do block ifTemplate1.description= if block + ifTemplate2.description= if currently executing script block ifelseTemplate1.description= if-else block elsifTemplate1.description= elsif block Index: rdt.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/templates/rdt.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** rdt.xml 18 Feb 2006 16:53:50 -0000 1.3 --- rdt.xml 22 Feb 2006 21:25:51 -0000 1.4 *************** *** 82,85 **** --- 82,93 ---- <template context="ruby" + description="%ifTemplate2.description" + id="org.rubypeople.rdt.ui.templates.if2" + name="if">if __FILE__ == $0 + ${cursor} + end</template> + + <template + context="ruby" description="%ifelseTemplate1.description" id="org.rubypeople.rdt.ui.templates.ifelse1" |
|
From: Christopher W. <caw...@us...> - 2006-02-22 21:05:44
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2636/src/org/rubypeople/rdt/internal/debug/ui/launcher Modified Files: RubyEnvironmentTab.java Log Message: remove instance where we created a RubyProject with wrong constructor. Fix RubyProject to not override getParent() and return null. Index: RubyEnvironmentTab.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEnvironmentTab.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** RubyEnvironmentTab.java 13 Dec 2005 21:10:44 -0000 1.22 --- RubyEnvironmentTab.java 22 Feb 2006 21:05:37 -0000 1.23 *************** *** 26,32 **** import org.eclipse.swt.widgets.TabFolder; import org.eclipse.swt.widgets.TabItem; import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.internal.core.LoadpathEntry; ! import org.rubypeople.rdt.internal.core.RubyProject; import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiMessages; import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiPlugin; --- 26,34 ---- import org.eclipse.swt.widgets.TabFolder; import org.eclipse.swt.widgets.TabItem; + import org.rubypeople.rdt.core.IRubyProject; import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.internal.core.LoadpathEntry; ! import org.rubypeople.rdt.internal.core.RubyModel; ! import org.rubypeople.rdt.internal.core.RubyModelManager; import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiMessages; import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiPlugin; *************** *** 168,172 **** String projectName = configuration.getAttribute(RubyLaunchConfigurationAttribute.PROJECT_NAME, ""); if (projectName.length() != 0) { ! RubyProject project = RubyCore.getRubyProject(projectName); if (project != null) { List loadPathEntries = project.getLoadPathEntries(); --- 170,174 ---- String projectName = configuration.getAttribute(RubyLaunchConfigurationAttribute.PROJECT_NAME, ""); if (projectName.length() != 0) { ! IRubyProject project = RubyModelManager.getRubyModelManager().getRubyModel().getRubyProject(projectName); if (project != null) { List loadPathEntries = project.getLoadPathEntries(); |
|
From: Christopher W. <caw...@us...> - 2006-02-22 21:05:41
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2598/src/org/rubypeople/rdt/core Modified Files: RubyCore.java Log Message: remove instance where we created a RubyProject with wrong constructor. Fix RubyProject to not override getParent() and return null. Index: RubyCore.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** RubyCore.java 10 Feb 2006 18:35:09 -0000 1.29 --- RubyCore.java 22 Feb 2006 21:05:32 -0000 1.30 *************** *** 339,352 **** } - public static RubyProject getRubyProject(String name) { - IProject aProject = RubyCore.getWorkspace().getRoot().getProject(name); - if (isRubyProject(aProject)) { - RubyProject theRubyProject = new RubyProject(); - theRubyProject.setProject(aProject); - return theRubyProject; - } - return null; - } - public static boolean isRubyProject(IProject aProject) { try { --- 339,342 ---- |
|
From: Christopher W. <caw...@us...> - 2006-02-22 21:05:40
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2598/src/org/rubypeople/rdt/internal/core Modified Files: RubyProject.java Log Message: remove instance where we created a RubyProject with wrong constructor. Fix RubyProject to not override getParent() and return null. Index: RubyProject.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyProject.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** RubyProject.java 10 Feb 2006 18:29:16 -0000 1.18 --- RubyProject.java 22 Feb 2006 21:05:33 -0000 1.19 *************** *** 74,78 **** /** ! * Configure the project with Java nature. */ public void configure() throws CoreException { --- 74,78 ---- /** ! * Configure the project with Ruby nature. */ public void configure() throws CoreException { *************** *** 425,429 **** /* ! * (non-Rubydoc) * * @see org.rubypeople.rdt.core.IRubyElement#getElementName() --- 425,429 ---- /* ! * (non-Javadoc) * * @see org.rubypeople.rdt.core.IRubyElement#getElementName() *************** *** 434,438 **** /* ! * (non-Rubydoc) * * @see org.rubypeople.rdt.internal.core.parser.RubyElement#getElementType() --- 434,438 ---- /* ! * (non-Javadoc) * * @see org.rubypeople.rdt.internal.core.parser.RubyElement#getElementType() *************** *** 443,447 **** /* ! * (non-Rubydoc) * * @see org.rubypeople.rdt.core.IRubyElement#hasChildren() --- 443,447 ---- /* ! * (non-Javadoc) * * @see org.rubypeople.rdt.core.IRubyElement#hasChildren() *************** *** 452,465 **** /* ! * (non-Rubydoc) ! * ! * @see org.rubypeople.rdt.core.IRubyElement#getParent() ! */ ! public IRubyElement getParent() { ! return null; ! } ! ! /* ! * (non-Rubydoc) * * @see org.rubypeople.rdt.core.IRubyProject#findType(java.lang.String) --- 452,456 ---- /* ! * (non-Javadoc) * * @see org.rubypeople.rdt.core.IRubyProject#findType(java.lang.String) |