You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(41) |
Apr
(9) |
May
|
Jun
|
Jul
(39) |
Aug
(38) |
Sep
(135) |
Oct
(220) |
Nov
(75) |
Dec
(74) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(44) |
Feb
(160) |
Mar
(49) |
Apr
(69) |
May
(40) |
Jun
(52) |
Jul
(47) |
Aug
(51) |
Sep
(19) |
Oct
(22) |
Nov
(36) |
Dec
(76) |
| 2007 |
Jan
(154) |
Feb
(165) |
Mar
(186) |
Apr
(143) |
May
(175) |
Jun
(133) |
Jul
(203) |
Aug
(177) |
Sep
(136) |
Oct
|
Nov
|
Dec
|
|
From: Christopher W. <caw...@us...> - 2006-04-05 02:09:46
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1222/src/org/rubypeople/rdt/internal/core Modified Files: RubyScriptStructureBuilder.java Log Message: clean up output statements, show only when DEBUG set to true Index: RubyScriptStructureBuilder.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptStructureBuilder.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** RubyScriptStructureBuilder.java 4 Apr 2006 23:10:47 -0000 1.19 --- RubyScriptStructureBuilder.java 5 Apr 2006 02:09:41 -0000 1.20 *************** *** 141,157 **** private InfoStack infoStack = new InfoStack(); - private HandleStack modelStack = new HandleStack(); - private RubyScriptElementInfo scriptInfo; - private IRubyScript script; - private Visibility currentVisibility = Visibility.PUBLIC; - private Map newElements; - private RubyElementInfo importContainerInfo; - private boolean DEBUG = false; --- 141,150 ---- *************** *** 766,786 **** */ private String[] getArgs(Node argsNode) { - System.out.println("Got argument node: " + argsNode.toString()); ArgsNode args = (ArgsNode) argsNode; boolean hasRest = false; if (args.getRestArg() != -1) ! hasRest = true; ! boolean hasBlock = false; if (args.getBlockArgNode() != null) ! hasBlock = true; ! int optArgCount = 0; if (args.getOptArgs() != null) ! optArgCount = args.getOptArgs().size(); List arguments = getArguments(args.getArgs()); if (optArgCount > 0) { arguments.addAll(getArguments(args.getOptArgs())); ! } if (hasRest) arguments.add("*rest"); --- 759,778 ---- */ private String[] getArgs(Node argsNode) { ArgsNode args = (ArgsNode) argsNode; boolean hasRest = false; if (args.getRestArg() != -1) ! hasRest = true; ! boolean hasBlock = false; if (args.getBlockArgNode() != null) ! hasBlock = true; ! int optArgCount = 0; if (args.getOptArgs() != null) ! optArgCount = args.getOptArgs().size(); List arguments = getArguments(args.getArgs()); if (optArgCount > 0) { arguments.addAll(getArguments(args.getOptArgs())); ! } if (hasRest) arguments.add("*rest"); *************** *** 803,807 **** Object node = iter.next(); if (node instanceof ArgumentNode) { ! arguments.add(((ArgumentNode)node).getName()); } else if (node instanceof LocalAsgnNode) { LocalAsgnNode local = (LocalAsgnNode) node; --- 795,799 ---- Object node = iter.next(); if (node instanceof ArgumentNode) { ! arguments.add(((ArgumentNode) node).getName()); } else if (node instanceof LocalAsgnNode) { LocalAsgnNode local = (LocalAsgnNode) node; *************** *** 810,816 **** argString += stringRepresentation(local.getValueNode()); arguments.add(argString); ! } ! else { ! System.err.println("Reached argument node type we can't handle"); } } --- 802,809 ---- argString += stringRepresentation(local.getValueNode()); arguments.add(argString); ! } else { ! if (DEBUG) ! System.err ! .println("Reached argument node type we can't handle"); } } *************** *** 819,831 **** private String stringRepresentation(Node node) { ! if (node instanceof HashNode) return "{}"; ! if (node instanceof ZArrayNode) return "[]"; ! if (node instanceof FixnumNode) return "" + ((FixnumNode)node).getValue(); ! if (node instanceof DStrNode) return stringRepresentation((DStrNode) node); ! if (node instanceof StrNode) return ((StrNode) node).getValue(); ! System.err.println("Reached node type we don't know how to represent: " + node.getClass().getName()); return node.toString(); } ! private String stringRepresentation(DStrNode node) { List children = node.childNodes(); --- 812,830 ---- private String stringRepresentation(Node node) { ! if (node instanceof HashNode) ! return "{}"; ! if (node instanceof ZArrayNode) ! return "[]"; ! if (node instanceof FixnumNode) ! return "" + ((FixnumNode) node).getValue(); ! if (node instanceof DStrNode) ! return stringRepresentation((DStrNode) node); ! if (node instanceof StrNode) ! return ((StrNode) node).getValue(); ! if (DEBUG) System.err.println("Reached node type we don't know how to represent: " ! + node.getClass().getName()); return node.toString(); } ! private String stringRepresentation(DStrNode node) { List children = node.childNodes(); *************** *** 1699,1704 **** currentVisibility = Visibility.PROTECTED; } - // TODO Set the method visibility for any arguments to the above - // methods! return null; } --- 1698,1701 ---- *************** *** 1780,1785 **** */ private Instruction handleNode(Node visited) { ! // TODO Uncomment for logging? ! // if (DEBUG) System.out.println(visited.toString() + ", position -> " + visited.getPosition()); --- 1777,1782 ---- */ private Instruction handleNode(Node visited) { ! // Uncomment for logging ! if (DEBUG) System.out.println(visited.toString() + ", position -> " + visited.getPosition()); |
|
From: Christopher W. <caw...@us...> - 2006-04-04 23:12:48
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/browsing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25331/src/org/rubypeople/rdt/internal/ui/browsing Modified Files: TypesView.java Log Message: append file info to types listed in TypesView for Browsing Perspective (since otherwise we'll see lots of exact duplicates for every place a class was redefined/re-opened) Index: TypesView.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/browsing/TypesView.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TypesView.java 30 Mar 2006 03:09:01 -0000 1.2 --- TypesView.java 4 Apr 2006 23:12:41 -0000 1.3 *************** *** 6,10 **** --- 6,14 ---- import org.rubypeople.rdt.core.IRubyScript; import org.rubypeople.rdt.core.IType; + import org.rubypeople.rdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; + import org.rubypeople.rdt.internal.ui.viewsupport.RubyElementImageProvider; + import org.rubypeople.rdt.internal.ui.viewsupport.RubyUILabelProvider; import org.rubypeople.rdt.ui.PreferenceConstants; + import org.rubypeople.rdt.ui.RubyElementLabels; public class TypesView extends RubyBrowsingPart { *************** *** 26,29 **** --- 30,40 ---- } + protected RubyUILabelProvider createLabelProvider() { + return new AppearanceAwareLabelProvider( + AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | RubyElementLabels.T_DECLARATION_POINT, + AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS + | RubyElementImageProvider.SMALL_ICONS); + } + /** * Finds the element which has to be selected in this part. |
|
From: Christopher W. <caw...@us...> - 2006-04-04 23:11:55
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24679/src/org/rubypeople/rdt/ui Modified Files: RubyElementLabels.java Log Message: add new option and code for appending file information to types (where that particular declaration/modification starts) Index: RubyElementLabels.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/RubyElementLabels.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RubyElementLabels.java 30 Mar 2006 03:05:01 -0000 1.3 --- RubyElementLabels.java 4 Apr 2006 23:11:52 -0000 1.4 *************** *** 27,31 **** * Ruby elements. * ! * @since 3.1 */ public class RubyElementLabels { --- 27,31 ---- * Ruby elements. * ! * @since 0.8.0 */ public class RubyElementLabels { *************** *** 174,177 **** --- 174,179 ---- */ public final static long REFERENCED_ROOT_POST_QUALIFIED = 1L << 45; + + static public final long T_DECLARATION_POINT = 1L << 46; /** *************** *** 515,518 **** --- 517,534 ---- } buf.append(typeName); + + if (getFlag(flags, T_DECLARATION_POINT)) { + buf.append(" ["); + buf.append(type.getPath().makeRelative().toOSString()); + try { + int offset = type.getNameRange().getOffset(); + buf.append(", offset: "); + buf.append(offset); + } catch (RubyModelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + buf.append("] "); + } // post qualification |
|
From: Christopher W. <caw...@us...> - 2006-04-04 23:11:17
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/viewsupport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24381/src/org/rubypeople/rdt/internal/ui/viewsupport Modified Files: AppearanceAwareLabelProvider.java Log Message: default is to show method arguments Index: AppearanceAwareLabelProvider.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/viewsupport/AppearanceAwareLabelProvider.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AppearanceAwareLabelProvider.java 10 Feb 2006 19:54:46 -0000 1.1 --- AppearanceAwareLabelProvider.java 4 Apr 2006 23:11:11 -0000 1.2 *************** *** 24,28 **** public class AppearanceAwareLabelProvider extends RubyUILabelProvider implements IPropertyChangeListener { ! public final static long DEFAULT_TEXTFLAGS= RubyElementLabels.ROOT_VARIABLE | RubyElementLabels.REFERENCED_ROOT_POST_QUALIFIED; public final static int DEFAULT_IMAGEFLAGS= RubyElementImageProvider.OVERLAY_ICONS; --- 24,28 ---- public class AppearanceAwareLabelProvider extends RubyUILabelProvider implements IPropertyChangeListener { ! public final static long DEFAULT_TEXTFLAGS= RubyElementLabels.M_PARAMETER_NAMES | RubyElementLabels.ROOT_VARIABLE | RubyElementLabels.REFERENCED_ROOT_POST_QUALIFIED; public final static int DEFAULT_IMAGEFLAGS= RubyElementImageProvider.OVERLAY_ICONS; |
|
From: Christopher W. <caw...@us...> - 2006-04-04 23:10:54
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23857/src/org/rubypeople/rdt/internal/core Modified Files: RubyScriptStructureBuilder.java Log Message: parse out arguments to methods and stick it in model Index: RubyScriptStructureBuilder.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptStructureBuilder.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** RubyScriptStructureBuilder.java 18 Feb 2006 16:50:17 -0000 1.18 --- RubyScriptStructureBuilder.java 4 Apr 2006 23:10:47 -0000 1.19 *************** *** 34,37 **** --- 34,38 ---- import org.jruby.ast.ArgsCatNode; import org.jruby.ast.ArgsNode; + import org.jruby.ast.ArgumentNode; import org.jruby.ast.ArrayNode; import org.jruby.ast.BackRefNode; *************** *** 77,80 **** --- 78,82 ---- import org.jruby.ast.InstVarNode; [...1947 lines suppressed...] ! return null; } *************** *** 1680,1685 **** private Instruction handleNode(Node visited) { // TODO Uncomment for logging? ! if (DEBUG ) System.out.println(visited.toString() + ", position -> " + visited.getPosition()); ! return null; } --- 1781,1788 ---- private Instruction handleNode(Node visited) { // TODO Uncomment for logging? ! // if (DEBUG) ! System.out.println(visited.toString() + ", position -> " ! + visited.getPosition()); ! return null; } |
|
From: Christopher W. <caw...@us...> - 2006-04-04 23:06:26
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20546/src/org/rubypeople/rdt/core Modified Files: RubyCore.java Log Message: fix null pointer bug on RubyBrowsingPart.setInitialSelection Index: RubyCore.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** RubyCore.java 29 Mar 2006 22:45:23 -0000 1.32 --- RubyCore.java 4 Apr 2006 23:06:22 -0000 1.33 *************** *** 392,404 **** } ! public static IRubyElement create(IResource resource) { ! switch (resource.getType()) { ! case IResource.FILE: ! return create((IFile) resource); ! case IResource.PROJECT: ! return create((IProject) resource); ! default: // TODO Is this anywhere near correct? ! return null; ! } } --- 392,397 ---- } ! public static IRubyElement create(IResource resource) { ! return RubyModelManager.create(resource, null/*unknown ruby project*/); } |
|
From: Christopher W. <caw...@us...> - 2006-04-04 23:06:26
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20546/src/org/rubypeople/rdt/internal/core Modified Files: RubyModelManager.java Log Message: fix null pointer bug on RubyBrowsingPart.setInitialSelection Index: RubyModelManager.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyModelManager.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RubyModelManager.java 10 Feb 2006 18:29:16 -0000 1.7 --- RubyModelManager.java 4 Apr 2006 23:06:22 -0000 1.8 *************** *** 11,17 **** --- 11,21 ---- import java.util.Map; + 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.resources.IResourceChangeEvent; import org.eclipse.core.resources.IWorkspace; + import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; *************** *** 38,41 **** --- 42,46 ---- import org.rubypeople.rdt.internal.core.buffer.BufferManager; import org.rubypeople.rdt.internal.core.builder.RubyBuilder; + import org.rubypeople.rdt.internal.core.util.Util; /** *************** *** 722,728 **** public void contentTypeChanged(ContentTypeChangeEvent event) { ! // TODO Change our classes which determine if a file is "Ruby-like" ! //Util.resetRubyLikeExtensions(); } } --- 727,751 ---- public void contentTypeChanged(ContentTypeChangeEvent event) { ! Util.resetRubyLikeExtensions(); } + public static IRubyElement create(IResource resource, IRubyProject project) { + if (resource == null) { + return null; + } + int type = resource.getType(); + switch (type) { + case IResource.PROJECT : + return RubyCore.create((IProject) resource); + case IResource.FILE : + return create((IFile) resource, project); + case IResource.FOLDER : + return create((IFolder) resource, project); + case IResource.ROOT : + return RubyCore.create((IWorkspaceRoot) resource); + default : + return null; + } + } + } |
|
From: Christopher W. <caw...@us...> - 2006-04-04 23:06:26
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20546/src/org/rubypeople/rdt/internal/core/util Modified Files: Util.java Log Message: fix null pointer bug on RubyBrowsingPart.setInitialSelection Index: Util.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/Util.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Util.java 29 Mar 2006 22:38:00 -0000 1.9 --- Util.java 4 Apr 2006 23:06:22 -0000 1.10 *************** *** 592,594 **** --- 592,599 ---- } + public static void resetRubyLikeExtensions() { + RUBY_LIKE_EXTENSIONS = null; + RUBY_LIKE_FILENAMES = null; + } + } |
|
From: Christopher W. <caw...@us...> - 2006-04-04 23:06:16
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/browsing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20474/src/org/rubypeople/rdt/internal/ui/browsing Modified Files: RubyBrowsingPart.java Added Files: ToggleLinkingAction.java Log Message: fix null pointer bug on RubyBrowsingPart.setInitialSelection --- NEW FILE: ToggleLinkingAction.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.browsing; import org.rubypeople.rdt.internal.ui.actions.AbstractToggleLinkingAction; /** * This action toggles whether this package explorer links its selection to the active * editor. * * @since 2.1 */ public class ToggleLinkingAction extends AbstractToggleLinkingAction { RubyBrowsingPart fRubyBrowsingPart; /** * Constructs a new action. */ public ToggleLinkingAction(RubyBrowsingPart part) { setChecked(part.isLinkingEnabled()); fRubyBrowsingPart= part; } /** * Runs the action. */ public void run() { fRubyBrowsingPart.setLinkingEnabled(isChecked()); } } Index: RubyBrowsingPart.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/browsing/RubyBrowsingPart.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RubyBrowsingPart.java 30 Mar 2006 03:09:01 -0000 1.2 --- RubyBrowsingPart.java 4 Apr 2006 23:06:09 -0000 1.3 *************** *** 8,12 **** --- 8,14 ---- import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IMarker; + import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IAdaptable; + import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Platform; import org.eclipse.jface.action.IAction; *************** *** 16,19 **** --- 18,22 ---- import org.eclipse.jface.util.Assert; import org.eclipse.jface.viewers.IContentProvider; + import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.IOpenListener; import org.eclipse.jface.viewers.ISelection; *************** *** 28,41 **** --- 31,49 ---- import org.eclipse.search.ui.ISearchResultViewPart; import org.eclipse.swt.widgets.Composite; + import org.eclipse.swt.widgets.Display; + import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IActionBars; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IFileEditorInput; + import org.eclipse.ui.IMemento; import org.eclipse.ui.IPartListener2; import org.eclipse.ui.ISelectionListener; + import org.eclipse.ui.IViewSite; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.IWorkbenchPartReference; import org.eclipse.ui.IWorkbenchPartSite; + import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.actions.ActionContext; *************** *** 44,47 **** --- 52,56 ---- import org.eclipse.ui.part.ShowInContext; import org.eclipse.ui.part.ViewPart; + import org.eclipse.ui.texteditor.ITextEditor; import org.osgi.framework.Bundle; import org.rubypeople.rdt.core.IRubyElement; *************** *** 57,60 **** --- 66,72 ---- import org.rubypeople.rdt.ui.IWorkingCopyManager; import org.rubypeople.rdt.ui.PreferenceConstants; + import org.rubypeople.rdt.ui.RubyElementLabelProvider; + import org.rubypeople.rdt.ui.RubyElementLabels; + import org.rubypeople.rdt.ui.RubyElementSorter; import org.rubypeople.rdt.ui.StandardRubyElementContentProvider; import org.rubypeople.rdt.ui.actions.CustomFiltersActionGroup; *************** *** 65,71 **** --- 77,85 ---- private StructuredViewer fViewer; + private IMemento fMemento; private RubyUILabelProvider fLabelProvider; protected IWorkbenchPart fPreviousSelectionProvider; protected Object fPreviousSelectedElement; + private ILabelProvider fTitleProvider; // Actions *************** *** 73,76 **** --- 87,91 ---- private OpenEditorActionGroup fOpenEditorGroup; protected CompositeActionGroup fActionGroups; + private ToggleLinkingAction fToggleLinkingAction; // Filters *************** *** 123,126 **** --- 138,142 ---- }; + public RubyBrowsingPart() { super(); *************** *** 136,139 **** --- 152,157 ---- if (fHasCustomFilter) fCustomFiltersActionGroup= new CustomFiltersActionGroup(this, fViewer); + + fToggleLinkingAction= new ToggleLinkingAction(this); } *************** *** 191,200 **** --- 209,228 ---- .setLabelProvider(new DecoratingRubyLabelProvider( fLabelProvider)); + fViewer.setSorter(createRubyElementSorter()); fViewer.setUseHashlookup(true); + fTitleProvider= createTitleProvider(); getSite().setSelectionProvider(fViewer); + if (fMemento != null) { // initialize linking state before creating the actions + restoreLinkingEnabled(fMemento); + } createActions(); // call before registering for selection changes + if (fMemento != null) + restoreState(fMemento); + + getSite().setSelectionProvider(fViewer); + hookViewerListeners(); *************** *** 213,216 **** --- 241,276 ---- } + protected ILabelProvider createTitleProvider() { + return new RubyElementLabelProvider(RubyElementLabelProvider.SHOW_BASICS | RubyElementLabelProvider.SHOW_SMALL_ICONS); + } + + /* + * Implements method from IViewPart. + */ + public void init(IViewSite site, IMemento memento) throws PartInitException { + super.init(site, memento); + fMemento= memento; + } + + private void restoreLinkingEnabled(IMemento memento) { + Integer val= memento.getInteger(getLinkToEditorKey()); + if (val != null) { + fLinkingEnabled= val.intValue() != 0; + } + } + + protected void restoreState(IMemento memento) { + // if (fHasWorkingSetFilter) + // fWorkingSetFilterActionGroup.restoreState(memento); + if (fHasCustomFilter) + fCustomFiltersActionGroup.restoreState(memento); + + if (fHasCustomFilter /*|| fHasWorkingSetFilter*/) { + fViewer.getControl().setRedraw(false); + fViewer.refresh(); + fViewer.getControl().setRedraw(true); + } + } + protected StructuredViewer createViewer(Composite parent) { // TODO Use ProblemTreeViewer *************** *** 233,238 **** fCustomFiltersActionGroup.fillActionBars(actionBars); ! // IMenuManager menu= actionBars.getMenuManager(); ! // menu.add(fToggleLinkingAction); } --- 293,298 ---- fCustomFiltersActionGroup.fillActionBars(actionBars); ! IMenuManager menu= actionBars.getMenuManager(); ! menu.add(fToggleLinkingAction); } *************** *** 273,280 **** protected void setInput(Object input) { setViewerInput(input); ! // TODO Update the title ! // updateTitle(); } private void setViewerInput(Object input) { fProcessSelectionEvents = false; --- 333,373 ---- protected void setInput(Object input) { setViewerInput(input); ! updateTitle(); ! } ! ! void updateTitle() { ! setTitleToolTip(getToolTipText(fViewer.getInput())); ! } ! ! /** ! * Returns the tool tip text for the given element. ! */ ! String getToolTipText(Object element) { ! String result; ! if (!(element instanceof IResource)) { ! result= RubyElementLabels.getTextLabel(element, AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS); ! } else { ! IPath path= ((IResource) element).getFullPath(); ! if (path.isRoot()) { ! result= getConfigurationElement().getAttribute("name"); //$NON-NLS-1$ ! } else { ! result= path.makeRelative().toString(); ! } ! } ! ! // if (fWorkingSetFilterActionGroup == null || fWorkingSetFilterActionGroup.getWorkingSet() == null) ! return result; ! ! // IWorkingSet ws= fWorkingSetFilterActionGroup.getWorkingSet(); ! // String wsstr= Messages.format(RubyBrowsingMessages.RubyBrowsingPart_toolTip, new String[] { ws.getLabel() }); ! // if (result.length() == 0) ! // return wsstr; ! // return Messages.format(RubyBrowsingMessages.RubyBrowsingPart_toolTip2, new String[] { result, ws.getLabel() }); } + protected final void setViewer(StructuredViewer viewer){ + fViewer= viewer; + } + private void setViewerInput(Object input) { fProcessSelectionEvents = false; *************** *** 308,317 **** return; ! // TODO Handle editor selections ! // if (fToggleLinkingAction.isChecked() && (part instanceof ! // ITextEditor)) { ! // setSelectionFromEditor(part, selection); ! // return; ! // } if (!(selection instanceof IStructuredSelection)) --- 401,409 ---- return; ! ! if (fToggleLinkingAction.isChecked() && (part instanceof ITextEditor)) { ! setSelectionFromEditor(part, selection); ! return; ! } if (!(selection instanceof IStructuredSelection)) *************** *** 335,344 **** elementToSelect) < 0) setSelection(new StructuredSelection(elementToSelect), true); ! // TODO Uncomment when we have a MembersView ! // else if (elementToSelect == null && (this instanceof ! // MembersView)) { ! // setSelection(StructuredSelection.EMPTY, true); ! // fPreviousSelectedElement= StructuredSelection.EMPTY; ! // } fPreviousSelectionProvider = part; return; --- 427,434 ---- elementToSelect) < 0) setSelection(new StructuredSelection(elementToSelect), true); ! else if (elementToSelect == null && (this instanceof MembersView)) { ! setSelection(StructuredSelection.EMPTY, true); ! fPreviousSelectedElement = StructuredSelection.EMPTY; ! } fPreviousSelectionProvider = part; return; *************** *** 640,643 **** --- 730,756 ---- } + protected RubyElementSorter createRubyElementSorter() { + return new RubyElementSorter(); + } + + /** + * Returns the shell to use for opening dialogs. + * Used in this class, and in the actions. + */ + Shell getShell() { + return fViewer.getControl().getShell(); + } + + protected final Display getDisplay() { + return fViewer.getControl().getDisplay(); + } + + /** + * Returns the selection provider. + */ + ISelectionProvider getSelectionProvider() { + return fViewer; + } + /** * Answers if the given <code>element</code> is a valid input for this *************** *** 739,742 **** --- 852,878 ---- } + /* + * Implements method from IViewPart. + */ + public void saveState(IMemento memento) { + if (fViewer == null) { + // part has not been created + if (fMemento != null) //Keep the old state; + memento.putMemento(fMemento); + return; + } + // if (fHasWorkingSetFilter) + // fWorkingSetFilterActionGroup.saveState(memento); + if (fHasCustomFilter) + fCustomFiltersActionGroup.saveState(memento); + // saveSelectionState(memento); + saveLinkingEnabled(memento); + } + + private void saveLinkingEnabled(IMemento memento) { + memento.putInteger(getLinkToEditorKey(), fLinkingEnabled ? 1 : 0); + } + + protected void setInitialSelection() { // Use the selection, if any |
|
From: Christopher W. <caw...@us...> - 2006-03-30 03:16:43
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4970/src/org/rubypeople/rdt/internal/ui/rubyeditor Modified Files: RubyDocumentProvider.java Log Message: show temporary marker annotations (markers on working copy that isn't saved for problems/tasks/warnings) Index: RubyDocumentProvider.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyDocumentProvider.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** RubyDocumentProvider.java 13 Dec 2005 20:01:50 -0000 1.21 --- RubyDocumentProvider.java 30 Mar 2006 03:16:39 -0000 1.22 *************** *** 10,13 **** --- 10,14 ---- import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; + import org.eclipse.jface.util.ListenerList; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.SubProgressMonitor; *************** *** 23,28 **** --- 24,33 ---- import org.eclipse.jface.text.source.IAnnotationAccessExtension; import org.eclipse.jface.text.source.IAnnotationModel; + import org.eclipse.jface.text.source.IAnnotationModelListener; + import org.eclipse.jface.text.source.IAnnotationModelListenerExtension; import org.eclipse.jface.text.source.IAnnotationPresentation; import org.eclipse.jface.text.source.ImageUtilities; + import org.eclipse.jface.util.IPropertyChangeListener; + import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.GC; *************** *** 60,63 **** --- 65,108 ---- } + protected static class GlobalAnnotationModelListener implements IAnnotationModelListener, IAnnotationModelListenerExtension { + + private ListenerList fListenerList; + + public GlobalAnnotationModelListener() { + fListenerList= new ListenerList(); + } + + /** + * @see IAnnotationModelListener#modelChanged(IAnnotationModel) + */ + public void modelChanged(IAnnotationModel model) { + Object[] listeners= fListenerList.getListeners(); + for (int i= 0; i < listeners.length; i++) { + ((IAnnotationModelListener) listeners[i]).modelChanged(model); + } + } + + /** + * @see IAnnotationModelListenerExtension#modelChanged(AnnotationModelEvent) + */ + public void modelChanged(AnnotationModelEvent event) { + Object[] listeners= fListenerList.getListeners(); + for (int i= 0; i < listeners.length; i++) { + Object curr= listeners[i]; + if (curr instanceof IAnnotationModelListenerExtension) { + ((IAnnotationModelListenerExtension) curr).modelChanged(event); + } + } + } + + public void addListener(IAnnotationModelListener listener) { + fListenerList.add(listener); + } + + public void removeListener(IAnnotationModelListener listener) { + fListenerList.remove(listener); + } + } + /** Preference key for temporary problems */ private final static String HANDLE_TEMPORARY_PROBLEMS= PreferenceConstants.EDITOR_EVALUTE_TEMPORARY_PROBLEMS; *************** *** 67,74 **** --- 112,132 ---- /** The save policy used by this provider */ private ISavePolicy fSavePolicy; + /** Internal property changed listener */ + private IPropertyChangeListener fPropertyListener; + /** Annotation model listener added to all created CU annotation models */ + private GlobalAnnotationModelListener fGlobalAnnotationModelListener; public RubyDocumentProvider() { IDocumentProvider provider = new TextFileDocumentProvider(); setParentDocumentProvider(provider); + + fGlobalAnnotationModelListener= new GlobalAnnotationModelListener(); + fPropertyListener= new IPropertyChangeListener() { + public void propertyChange(PropertyChangeEvent event) { + if (HANDLE_TEMPORARY_PROBLEMS.equals(event.getProperty())) + enableHandlingTemporaryProblems(); + } + }; + RubyPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(fPropertyListener); } *************** *** 99,102 **** --- 157,188 ---- } + /** + * Switches the state of problem acceptance according to the value in the preference store. + */ + protected void enableHandlingTemporaryProblems() { + boolean enable= isHandlingTemporaryProblems(); + for (Iterator iter= getFileInfosIterator(); iter.hasNext();) { + FileInfo info= (FileInfo) iter.next(); + if (info.fModel instanceof IProblemRequestorExtension) { + IProblemRequestorExtension extension= (IProblemRequestorExtension) info.fModel; + extension.setIsHandlingTemporaryProblems(enable); + } + } + } + + /* + * @see org.eclipse.jdt.internal.ui.javaeditor.ICompilationUnitDocumentProvider#addGlobalAnnotationModelListener(org.eclipse.jface.text.source.IAnnotationModelListener) + */ + public void addGlobalAnnotationModelListener(IAnnotationModelListener listener) { + fGlobalAnnotationModelListener.addListener(listener); + } + + /* + * @see org.eclipse.jdt.internal.ui.javaeditor.ICompilationUnitDocumentProvider#removeGlobalAnnotationModelListener(org.eclipse.jface.text.source.IAnnotationModelListener) + */ + public void removeGlobalAnnotationModelListener(IAnnotationModelListener listener) { + fGlobalAnnotationModelListener.removeListener(listener); + } + /* * @see org.eclipse.ui.editors.text.TextFileDocumentProvider#createFileInfo(java.lang.Object) *************** *** 122,127 **** } - // FIXME Pass in a RubyScriptAnnotationModel as an IProblemRequestor - // This is how the UI gets updated with the problems generated during parsing on a working copy original.becomeWorkingCopy(requestor, getProgressMonitor()); cuInfo.fCopy = original; --- 208,211 ---- *************** *** 132,135 **** --- 216,222 ---- } + if (cuInfo.fModel != null) + cuInfo.fModel.addAnnotationModelListener(fGlobalAnnotationModelListener); + return cuInfo; } *************** *** 174,177 **** --- 261,266 ---- handleCoreException(x, x.getMessage()); } + if (cuInfo.fModel != null) + cuInfo.fModel.removeAnnotationModelListener(fGlobalAnnotationModelListener); } super.disposeFileInfo(element, info); *************** *** 728,732 **** */ public void acceptProblem(IProblem problem) { - System.out.println("RubyScriptAnnotationModel received problem: " + problem); if (fIsHandlingTemporaryProblems) { ProblemRequestorState state= (ProblemRequestorState) fProblemRequestorState.get(); --- 817,820 ---- |
|
From: Christopher W. <caw...@us...> - 2006-03-30 03:12:40
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2747 Modified Files: plugin.properties plugin.xml Log Message: Index: plugin.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/plugin.properties,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** plugin.properties 28 Mar 2006 23:08:42 -0000 1.30 --- plugin.properties 30 Mar 2006 03:12:34 -0000 1.31 *************** *** 30,33 **** --- 30,35 ---- viewCategoryName=Ruby + appearancePrefName=Appearance + PerspectiveRuby.name=Ruby ViewRubyResources.name=Ruby Resources Index: plugin.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/plugin.xml,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** plugin.xml 28 Mar 2006 23:14:45 -0000 1.77 --- plugin.xml 30 Mar 2006 03:12:34 -0000 1.78 *************** *** 16,19 **** --- 16,26 ---- </page> <page + name="%appearancePrefName" + category="org.rubypeople.rdt.ui.preferences.PreferencePageRubyBase" + class="org.rubypeople.rdt.internal.ui.preferences.AppearancePreferencePage" + id="org.rubypeople.rdt.ui.preferences.AppearancePreferencePage"> + <keywordReference id="org.eclipse.rdt.ui.appearance"/> + </page> + <page name="%PreferencePage.RubyEditor.name" category="org.rubypeople.rdt.ui.preferences.PreferencePageRubyBase" *************** *** 48,52 **** <page name="%memberSortPrefName" ! category="org.rubypeople.rdt.ui.preferences.PreferencePageRubyBase" class="org.rubypeople.rdt.internal.ui.preferences.MembersOrderPreferencePage" id="org.rubypeople.rdt.ui.preferences.MembersOrderPreferencePage"> --- 55,59 ---- <page name="%memberSortPrefName" ! category="org.rubypeople.rdt.ui.preferences.AppearancePreferencePage" class="org.rubypeople.rdt.internal.ui.preferences.MembersOrderPreferencePage" id="org.rubypeople.rdt.ui.preferences.MembersOrderPreferencePage"> *************** *** 723,726 **** --- 730,757 ---- <textHoverProvider class="org.rubypeople.rdt.internal.ui.text.ruby.hover.RiDocHoverProvider" /> </extension> + + <extension + point="org.eclipse.ui.popupMenus"> + <viewerContribution + targetID="org.rubypeople.rdt.ui.rubyeditor.rulerContextMenu" + id="org.rubypeople.rdt.ui.RubyScriptEditorPopupActions"> + <action + label="%AddTask.label" + helpContextId="org.eclipse.ui.AddTask_action_context" + tooltip="%AddTask.tooltip" + class="org.eclipse.ui.texteditor.TaskRulerAction" + menubarPath="add" + id="org.eclipse.ui.texteditor.TaskRulerAction"> + </action> + <action + label="%AddBookmark.label" + helpContextId="org.eclipse.ui.bookmark_action_context" + tooltip="%AddBookmark.tooltip" + class="org.eclipse.ui.texteditor.BookmarkRulerAction" + menubarPath="add" + id="org.eclipse.ui.texteditor.BookmarkRulerAction"> + </action> + </viewerContribution> + </extension> </plugin> |
|
From: Christopher W. <caw...@us...> - 2006-03-30 03:09:34
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv922/src/org/rubypeople/rdt/internal/ui/rubyeditor Modified Files: EditorUtility.java Log Message: Index: EditorUtility.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/EditorUtility.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EditorUtility.java 28 Mar 2006 23:15:48 -0000 1.1 --- EditorUtility.java 30 Mar 2006 03:09:31 -0000 1.2 *************** *** 39,43 **** /** ! * Opens a Java editor for an element (IJavaElement, IFile, IStorage...) * @return the IEditorPart or null if wrong element type or opening failed */ --- 39,43 ---- /** ! * Opens a Ruby editor for an element (IJavaElement, IFile, IStorage...) * @return the IEditorPart or null if wrong element type or opening failed */ *************** *** 59,62 **** --- 59,74 ---- } + private static IEditorPart openInEditor(IFile file, boolean activate) throws PartInitException { + if (file != null) { + IWorkbenchPage p= RubyPlugin.getActivePage(); + if (p != null) { + IEditorPart editorPart= IDE.openEditor(p, file, activate); + initializeHighlightRange(editorPart); + return editorPart; + } + } + return null; + } + private static IEditorPart openInEditor(IEditorInput input, String editorID, boolean activate) throws PartInitException { if (input != null) { |
|
From: Christopher W. <caw...@us...> - 2006-03-30 03:09:12
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/browsing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv441/src/org/rubypeople/rdt/internal/ui/browsing Modified Files: MembersView.java RubyBrowsingPart.java RubyBrowsingContentProvider.java TypesView.java ProjectsView.java Added Files: RubyBrowsingMessages.java RubyBrowsingMessages.properties PatchedOpenInNewWindowAction.java Log Message: Index: TypesView.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/browsing/TypesView.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TypesView.java 25 Mar 2006 02:37:43 -0000 1.1 --- TypesView.java 30 Mar 2006 03:09:01 -0000 1.2 *************** *** 6,9 **** --- 6,10 ---- import org.rubypeople.rdt.core.IRubyScript; import org.rubypeople.rdt.core.IType; + import org.rubypeople.rdt.ui.PreferenceConstants; public class TypesView extends RubyBrowsingPart { *************** *** 21,24 **** --- 22,29 ---- } + protected String getLinkToEditorKey() { + return PreferenceConstants.LINK_BROWSING_TYPES_TO_EDITOR; + } + /** * Finds the element which has to be selected in this part. --- NEW FILE: RubyBrowsingMessages.properties --- ############################################################################### # 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 ############################################################################### RubyBrowsingPart_toolTip= Working Set: {0} RubyBrowsingPart_toolTip2= {0} - Working Set: {1} LexicalSortingAction_label= Sort LexicalSortingAction_tooltip= Sort LexicalSortingAction_description= Enable Sorting # the first argument is the string to which the second one is appended StatusBar_concat= {0}, {1} Index: RubyBrowsingPart.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/browsing/RubyBrowsingPart.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RubyBrowsingPart.java 25 Mar 2006 02:37:43 -0000 1.1 --- RubyBrowsingPart.java 30 Mar 2006 03:09:01 -0000 1.2 *************** *** 10,23 **** --- 10,35 ---- import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.Platform; + import org.eclipse.jface.action.IAction; + import org.eclipse.jface.action.IMenuManager; + import org.eclipse.jface.action.IToolBarManager; + import org.eclipse.jface.text.ITextSelection; import org.eclipse.jface.util.Assert; import org.eclipse.jface.viewers.IContentProvider; + import org.eclipse.jface.viewers.IOpenListener; [...1270 lines suppressed...] + protected IRubyElement getElementAt(IEditorInput input, int offset) { + IWorkingCopyManager manager= RubyPlugin.getDefault().getWorkingCopyManager(); + IRubyScript unit= manager.getWorkingCopy(input); + if (unit != null) + try { + if (unit.isConsistent()) + return unit.getElementAt(offset); + else { + /* + * XXX: We should set the selection later when the + * CU is reconciled. + * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=51290 + */ + } + } catch (RubyModelException ex) { + // fall through + } + return null; + } } --- NEW FILE: PatchedOpenInNewWindowAction.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.browsing; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.actions.OpenInNewWindowAction; import org.rubypeople.rdt.core.IRubyElement; import org.rubypeople.rdt.core.RubyCore; /* * XXX: This is a workaround for: http://dev.eclipse.org/bugs/show_bug.cgi?id=13070 * This class can be removed once the bug is fixed. * * @since 2.0 */ public class PatchedOpenInNewWindowAction extends OpenInNewWindowAction { private IWorkbenchWindow fWorkbenchWindow; public PatchedOpenInNewWindowAction(IWorkbenchWindow window, IAdaptable input) { super(window, input); fWorkbenchWindow= window; } public void run() { RubyBrowsingPerspectiveFactory.setInputFromAction(getSelectedRubyElement()); try { super.run(); } finally { RubyBrowsingPerspectiveFactory.setInputFromAction(null); } } private IRubyElement getSelectedRubyElement() { if (fWorkbenchWindow.getActivePage() != null) { ISelection selection= fWorkbenchWindow.getActivePage().getSelection(); if (selection instanceof IStructuredSelection && !selection.isEmpty()) { Object selectedElement= ((IStructuredSelection)selection).getFirstElement(); if (selectedElement instanceof IRubyElement) return (IRubyElement)selectedElement; if (!(selectedElement instanceof IRubyElement) && selectedElement instanceof IAdaptable) return (IRubyElement)((IAdaptable)selectedElement).getAdapter(IRubyElement.class); else if (selectedElement instanceof IWorkspace) return RubyCore.create(((IWorkspace)selectedElement).getRoot()); } } return null; } } Index: MembersView.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/browsing/MembersView.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MembersView.java 25 Mar 2006 02:37:43 -0000 1.1 --- MembersView.java 30 Mar 2006 03:09:01 -0000 1.2 *************** *** 1,4 **** --- 1,13 ---- package org.rubypeople.rdt.internal.ui.browsing; + import org.eclipse.jface.action.IToolBarManager; + import org.eclipse.jface.util.IPropertyChangeListener; + import org.eclipse.jface.util.PropertyChangeEvent; + import org.eclipse.jface.viewers.DoubleClickEvent; + import org.eclipse.jface.viewers.IDoubleClickListener; + import org.eclipse.jface.viewers.IStructuredSelection; + import org.eclipse.jface.viewers.StructuredViewer; + import org.eclipse.jface.viewers.TreeViewer; + import org.eclipse.swt.widgets.Composite; import org.rubypeople.rdt.core.IImportContainer; import org.rubypeople.rdt.core.IImportDeclaration; *************** *** 8,14 **** import org.rubypeople.rdt.core.IType; import org.rubypeople.rdt.core.RubyModelException; ! public class MembersView extends RubyBrowsingPart { /** * Answers if the given <code>element</code> is a valid --- 17,57 ---- import org.rubypeople.rdt.core.IType; import org.rubypeople.rdt.core.RubyModelException; + import org.rubypeople.rdt.internal.ui.RubyPlugin; + import org.rubypeople.rdt.internal.ui.actions.LexicalSortingAction; + import org.rubypeople.rdt.internal.ui.preferences.MembersOrderPreferenceCache; + import org.rubypeople.rdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; + import org.rubypeople.rdt.internal.ui.viewsupport.RubyUILabelProvider; + import org.rubypeople.rdt.ui.PreferenceConstants; + import org.rubypeople.rdt.ui.RubyElementLabels; + import org.rubypeople.rdt.ui.RubyUI; + import org.rubypeople.rdt.ui.actions.MemberFilterActionGroup; ! public class MembersView extends RubyBrowsingPart implements IPropertyChangeListener { + private MemberFilterActionGroup fMemberFilterActionGroup; + + public MembersView() { + // setHasWorkingSetFilter(false); + setHasCustomSetFilter(true); + RubyPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this); + } + + /** + * Creates and returns the label provider for this part. + * + * @return the label provider + * @see org.eclipse.jface.viewers.ILabelProvider + */ + protected RubyUILabelProvider createLabelProvider() { + return new AppearanceAwareLabelProvider( + AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | RubyElementLabels.M_PARAMETER_NAMES, + AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS + ); + } + + protected String getLinkToEditorKey() { + return PreferenceConstants.LINK_BROWSING_MEMBERS_TO_EDITOR; + } + /** * Answers if the given <code>element</code> is a valid *************** *** 50,53 **** --- 93,108 ---- return false; } + + protected void hookViewerListeners() { + super.hookViewerListeners(); + getViewer().addDoubleClickListener(new IDoubleClickListener() { + public void doubleClick(DoubleClickEvent event) { + TreeViewer viewer= (TreeViewer)getViewer(); + Object element= ((IStructuredSelection)event.getSelection()).getFirstElement(); + if (viewer.isExpandable(element)) + viewer.setExpandedState(element, !viewer.getExpandedState(element)); + } + }); + } /** *************** *** 135,137 **** --- 190,230 ---- } + /* (non-Javadoc) + * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent) + */ + public void propertyChange(PropertyChangeEvent event) { + if (MembersOrderPreferenceCache.isMemberOrderProperty(event.getProperty())) { + getViewer().refresh(); + } + } + + /* (non-Javadoc) + * @see org.eclipse.jdt.internal.ui.browsing.JavaBrowsingPart#dispose() + */ + public void dispose() { + if (fMemberFilterActionGroup != null) { + fMemberFilterActionGroup.dispose(); + fMemberFilterActionGroup= null; + } + super.dispose(); + RubyPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this); + } + + /** + * Creates the the viewer of this part. + * + * @param parent the parent for the viewer + */ + protected StructuredViewer createViewer(Composite parent) { + StructuredViewer viewer = super.createViewer(parent); + fMemberFilterActionGroup= new MemberFilterActionGroup(viewer, RubyUI.ID_MEMBERS_VIEW); + return viewer; + } + + protected void fillToolBar(IToolBarManager tbm) { + tbm.add(new LexicalSortingAction(getViewer(), RubyUI.ID_MEMBERS_VIEW)); + fMemberFilterActionGroup.contributeToToolBar(tbm); + super.fillToolBar(tbm); + } + } Index: RubyBrowsingContentProvider.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/browsing/RubyBrowsingContentProvider.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RubyBrowsingContentProvider.java 25 Mar 2006 02:37:43 -0000 1.1 --- RubyBrowsingContentProvider.java 30 Mar 2006 03:09:01 -0000 1.2 *************** *** 8,18 **** --- 8,25 ---- import org.eclipse.core.resources.IResource; + import org.eclipse.jface.viewers.AbstractTreeViewer; + import org.eclipse.jface.viewers.IBasicPropertyConstants; + import org.eclipse.jface.viewers.ListViewer; import org.eclipse.jface.viewers.StructuredViewer; + import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; + import org.rubypeople.rdt.core.ElementChangedEvent; + import org.rubypeople.rdt.core.IElementChangedListener; import org.rubypeople.rdt.core.IImportContainer; import org.rubypeople.rdt.core.IParent; import org.rubypeople.rdt.core.IRubyElement; + import org.rubypeople.rdt.core.IRubyElementDelta; import org.rubypeople.rdt.core.IRubyProject; import org.rubypeople.rdt.core.IRubyScript; *************** *** 21,28 **** import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.core.RubyModelException; import org.rubypeople.rdt.ui.StandardRubyElementContentProvider; public class RubyBrowsingContentProvider extends ! StandardRubyElementContentProvider { private RubyBrowsingPart fBrowsingPart; --- 28,37 ---- import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.core.RubyModelException; + import org.rubypeople.rdt.internal.corext.util.RubyModelUtil; + import org.rubypeople.rdt.internal.ui.RubyPlugin; import org.rubypeople.rdt.ui.StandardRubyElementContentProvider; public class RubyBrowsingContentProvider extends ! StandardRubyElementContentProvider implements IElementChangedListener { private RubyBrowsingPart fBrowsingPart; *************** *** 36,41 **** fBrowsingPart = browsingPart; fViewer = fBrowsingPart.getViewer(); ! // TODO Add element change listener ! // RubyCore.addElementChangedListener(this); } --- 45,49 ---- fBrowsingPart = browsingPart; fViewer = fBrowsingPart.getViewer(); ! RubyCore.addElementChangedListener(this); } *************** *** 158,168 **** } ! /* ! * (non-Javadoc) Method declared on IContentProvider. */ public void dispose() { super.dispose(); ! // TODO Listen for element changes ! // RubyCore.removeElementChangedListener(this); } --- 166,175 ---- } ! /* (non-Javadoc) ! * Method declared on IContentProvider. */ public void dispose() { super.dispose(); ! RubyCore.removeElementChangedListener(this); } *************** *** 194,196 **** --- 201,449 ---- } + /* (non-Javadoc) + * Method declared on IElementChangedListener. + */ + public void elementChanged(final ElementChangedEvent event) { + try { + processDelta(event.getDelta()); + } catch(RubyModelException e) { + RubyPlugin.log(e.getStatus()); + } + } + + /** + * Processes a delta recursively. When more than two children are affected the + * tree is fully refreshed starting at this node. The delta is processed in the + * current thread but the viewer updates are posted to the UI thread. + */ + protected void processDelta(IRubyElementDelta delta) throws RubyModelException { + int kind= delta.getKind(); + int flags= delta.getFlags(); + final IRubyElement element= delta.getElement(); + final boolean isElementValidForView= fBrowsingPart.isValidElement(element); + + if (!getProvideWorkingCopy() && element instanceof IRubyScript && ((IRubyScript)element).isWorkingCopy()) + return; + + if (element != null && element.getElementType() == IRubyElement.SCRIPT && !isOnClassPath((IRubyScript)element)) + return; + + // handle open and closing of a solution or project + if (((flags & IRubyElementDelta.F_CLOSED) != 0) || ((flags & IRubyElementDelta.F_OPENED) != 0)) { + postRefresh(null); + return; + } + + if (kind == IRubyElementDelta.REMOVED) { + Object parent= internalGetParent(element); + if (isElementValidForView) { + if (element instanceof IRubyScript && !((IRubyScript)element).isWorkingCopy()) { + postRefresh(null); + } else if (element instanceof IRubyScript && ((IRubyScript)element).isWorkingCopy()) { + if (getProvideWorkingCopy()) + postRefresh(null); + } else if (parent instanceof IRubyScript && getProvideWorkingCopy() && !((IRubyScript)parent).isWorkingCopy()) { + if (element instanceof IRubyScript && ((IRubyScript)element).isWorkingCopy()) { + // working copy removed from system - refresh + postRefresh(null); + } + } else if (element instanceof IRubyScript && ((IRubyScript)element).isWorkingCopy() && parent != null && parent.equals(fInput)) + // closed editor - removing working copy + postRefresh(null); + else + postRemove(element); + } + + if (fBrowsingPart.isAncestorOf(element, fInput)) { + if (element instanceof IRubyScript && ((IRubyScript)element).isWorkingCopy()) { + postAdjustInputAndSetSelection(RubyModelUtil.toOriginal((IRubyElement) fInput)); + } else + postAdjustInputAndSetSelection(null); + } + + if (fInput != null && fInput.equals(element)) + postRefresh(null); + + + return; + } + if (kind == IRubyElementDelta.ADDED && delta.getMovedFromElement() != null && element instanceof IRubyScript) + return; + + if (kind == IRubyElementDelta.ADDED) { + if (isElementValidForView) { + Object parent= internalGetParent(element); + if (element instanceof IRubyScript && !((IRubyScript)element).isWorkingCopy()) { + postAdd(parent, ((IRubyScript)element).getTypes()); + } else if (parent instanceof IRubyScript && getProvideWorkingCopy() && !((IRubyScript)parent).isWorkingCopy()) { + // do nothing + } else if (element instanceof IRubyScript && ((IRubyScript)element).isWorkingCopy()) { + // new working copy comes to live + postRefresh(null); + } else + postAdd(parent, element); + } else if (fInput == null) { + IRubyElement newInput= fBrowsingPart.findInputForRubyElement(element); + if (newInput != null) + postAdjustInputAndSetSelection(element); + } else if (element instanceof IType && fBrowsingPart.isValidInput(element)) { + IRubyElement cu1= element.getAncestor(IRubyElement.SCRIPT); + IRubyElement cu2= ((IRubyElement)fInput).getAncestor(IRubyElement.SCRIPT); + if (cu1 != null && cu2 != null && cu1.equals(cu2)) + postAdjustInputAndSetSelection(element); + } + return; + } + + if (kind == IRubyElementDelta.CHANGED) { + if (fInput != null && fInput.equals(element) && (flags & IRubyElementDelta.F_CHILDREN) != 0 && (flags & IRubyElementDelta.F_FINE_GRAINED) != 0) { + postRefresh(null, true); + return; + } + if (isElementValidForView && (flags & IRubyElementDelta.F_MODIFIERS) != 0) { + postUpdateIcon(element); + } + } + + if (isClassPathChange(delta)) + // throw the towel and do a full refresh + postRefresh(null); + + + + IRubyElementDelta[] affectedChildren= delta.getAffectedChildren(); + for (int i= 0; i < affectedChildren.length; i++) { + processDelta(affectedChildren[i]); + } + } + + private boolean isOnClassPath(IRubyScript element) throws RubyModelException { + IRubyProject project= element.getRubyProject(); + if (project == null || !project.exists()) + return false; + return project.isOnLoadpath(element); + } + + /** + * Updates the package icon + */ + private void postUpdateIcon(final IRubyElement element) { + postRunnable(new Runnable() { + public void run() { + Control ctrl= fViewer.getControl(); + if (ctrl != null && !ctrl.isDisposed()) + fViewer.update(element, new String[]{IBasicPropertyConstants.P_IMAGE}); + } + }); + } + + private void postRefresh(final Object root, final boolean updateLabels) { + postRunnable(new Runnable() { + public void run() { + Control ctrl= fViewer.getControl(); + if (ctrl != null && !ctrl.isDisposed()) + fViewer.refresh(root, updateLabels); + } + }); + } + + private void postRefresh(final Object root) { + postRefresh(root, false); + } + + private void postAdd(final Object parent, final Object element) { + postAdd(parent, new Object[] {element}); + } + + private void postAdd(final Object parent, final Object[] elements) { + if (elements == null || elements.length <= 0) + return; + + postRunnable(new Runnable() { + public void run() { + Control ctrl= fViewer.getControl(); + if (ctrl != null && !ctrl.isDisposed()) { + Object[] newElements= getNewElements(elements); + if (fViewer instanceof AbstractTreeViewer) { + if (fViewer.testFindItem(parent) == null) { + Object root= ((AbstractTreeViewer)fViewer).getInput(); + if (root != null) + ((AbstractTreeViewer)fViewer).add(root, newElements); + } + else + ((AbstractTreeViewer)fViewer).add(parent, newElements); + } + else if (fViewer instanceof ListViewer) + ((ListViewer)fViewer).add(newElements); + else if (fViewer instanceof TableViewer) + ((TableViewer)fViewer).add(newElements); + if (fViewer.testFindItem(elements[0]) != null) + fBrowsingPart.adjustInputAndSetSelection(elements[0]); + } + } + }); + } + + private Object[] getNewElements(Object[] elements) { + int elementsLength= elements.length; + ArrayList result= new ArrayList(elementsLength); + for (int i= 0; i < elementsLength; i++) { + Object element= elements[i]; + if (fViewer.testFindItem(element) == null) + result.add(element); + } + return result.toArray(); + } + + private void postRemove(final Object element) { + postRemove(new Object[] {element}); + } + + private void postRemove(final Object[] elements) { + if (elements.length <= 0) + return; + + postRunnable(new Runnable() { + public void run() { + Control ctrl= fViewer.getControl(); + if (ctrl != null && !ctrl.isDisposed()) { + if (fViewer instanceof AbstractTreeViewer) + ((AbstractTreeViewer)fViewer).remove(elements); + else if (fViewer instanceof ListViewer) + ((ListViewer)fViewer).remove(elements); + else if (fViewer instanceof TableViewer) + ((TableViewer)fViewer).remove(elements); + } + } + }); + } + + private void postAdjustInputAndSetSelection(final Object element) { + postRunnable(new Runnable() { + public void run() { + Control ctrl= fViewer.getControl(); + if (ctrl != null && !ctrl.isDisposed()) { + ctrl.setRedraw(false); + fBrowsingPart.adjustInputAndSetSelection(element); + ctrl.setRedraw(true); + } + } + }); + } + + private void postRunnable(final Runnable r) { + Control ctrl= fViewer.getControl(); + if (ctrl != null && !ctrl.isDisposed()) { + fBrowsingPart.setProcessSelectionEvents(false); + try { + if (isDisplayThread() && fReadsInDisplayThread == 0) + ctrl.getDisplay().syncExec(r); + else + ctrl.getDisplay().asyncExec(r); + } finally { + fBrowsingPart.setProcessSelectionEvents(true); + } + } + } + } --- NEW FILE: RubyBrowsingMessages.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.browsing; import org.eclipse.osgi.util.NLS; /** * Helper class to get NLSed messages. */ public final class RubyBrowsingMessages extends NLS { private static final String BUNDLE_NAME= RubyBrowsingMessages.class.getName(); private RubyBrowsingMessages() { // Do not instantiate } public static String RubyBrowsingPart_toolTip; public static String RubyBrowsingPart_toolTip2; public static String LexicalSortingAction_label; public static String LexicalSortingAction_tooltip; public static String LexicalSortingAction_description; public static String StatusBar_concat; static { NLS.initializeMessages(BUNDLE_NAME, RubyBrowsingMessages.class); } } Index: ProjectsView.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/browsing/ProjectsView.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ProjectsView.java 28 Mar 2006 23:08:08 -0000 1.2 --- ProjectsView.java 30 Mar 2006 03:09:01 -0000 1.3 *************** *** 1,5 **** --- 1,9 ---- package org.rubypeople.rdt.internal.ui.browsing; + import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IContentProvider; + import org.eclipse.jface.viewers.IDoubleClickListener; + import org.eclipse.jface.viewers.IStructuredSelection; + import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.ui.IPageLayout; import org.eclipse.ui.part.IShowInTargetList; *************** *** 9,12 **** --- 13,17 ---- import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.internal.ui.RubyPlugin; + import org.rubypeople.rdt.ui.PreferenceConstants; import org.rubypeople.rdt.ui.RubyUI; *************** *** 28,31 **** --- 33,40 ---- } + protected String getLinkToEditorKey() { + return PreferenceConstants.LINK_BROWSING_PROJECTS_TO_EDITOR; + } + /** * Answer the property defined by key. *************** *** 42,45 **** --- 51,69 ---- return super.getAdapter(key); } + + /** + * Adds additional listeners to this view. + */ + protected void hookViewerListeners() { + super.hookViewerListeners(); + getViewer().addDoubleClickListener(new IDoubleClickListener() { + public void doubleClick(DoubleClickEvent event) { + TreeViewer viewer= (TreeViewer)getViewer(); + Object element= ((IStructuredSelection)event.getSelection()).getFirstElement(); + if (viewer.isExpandable(element)) + viewer.setExpandedState(element, !viewer.getExpandedState(element)); + } + }); + } /** |
|
From: Christopher W. <caw...@us...> - 2006-03-30 03:06:55
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31680/src/org/rubypeople/rdt/ui/actions Added Files: OpenEditorActionGroup.java RdtActionConstants.java Log Message: --- NEW FILE: RdtActionConstants.java --- package org.rubypeople.rdt.ui.actions; public class RdtActionConstants { /** * Navigate menu: name of standard Open global action * (value <code>"org.rubypeople.rdt.ui.actions.Open"</code>). */ public static final String OPEN= "org.rubypeople.rdt.ui.actions.Open"; //$NON-NLS-1$ } --- NEW FILE: OpenEditorActionGroup.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.actions; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.search.ui.IContextMenuConstants; import org.eclipse.ui.IActionBars; import org.eclipse.ui.IViewPart; import org.eclipse.ui.IWorkbenchSite; import org.eclipse.ui.actions.ActionGroup; import org.eclipse.ui.actions.OpenWithMenu; import org.rubypeople.rdt.internal.ui.actions.ActionMessages; import org.rubypeople.rdt.internal.ui.rubyeditor.RubyEditor; /** * Action group that adds the actions opening a new editor to the * context menu and the action bar's navigate menu. * * <p> * This class may be instantiated; it is not intended to be subclassed. * </p> * * @since 2.0 */ public class OpenEditorActionGroup extends ActionGroup { private IWorkbenchSite fSite; private boolean fIsEditorOwner; private OpenAction fOpen; /** * Creates a new <code>OpenActionGroup</code>. The group requires * that the selection provided by the part's selection provider is of type <code> * org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param part the view part that owns this action group */ public OpenEditorActionGroup(IViewPart part) { fSite= part.getSite(); fOpen= new OpenAction(fSite); fOpen.setActionDefinitionId(IRubyEditorActionDefinitionIds.OPEN_EDITOR); initialize(fSite.getSelectionProvider()); } /** * Note: This constructor is for internal use only. Clients should not call this constructor. * @param editor the Ruby editor */ public OpenEditorActionGroup(RubyEditor editor) { fIsEditorOwner= true; fOpen= new OpenAction(editor); fOpen.setActionDefinitionId(IRubyEditorActionDefinitionIds.OPEN_EDITOR); editor.setAction("OpenEditor", fOpen); //$NON-NLS-1$ fSite= editor.getEditorSite(); initialize(fSite.getSelectionProvider()); } /** * Returns the open action managed by this action group. * * @return the open action. Returns <code>null</code> if the group * doesn't provide any open action */ public IAction getOpenAction() { return fOpen; } private void initialize(ISelectionProvider provider) { ISelection selection= provider.getSelection(); fOpen.update(selection); if (!fIsEditorOwner) { provider.addSelectionChangedListener(fOpen); } } /* (non-Rubydoc) * Method declared in ActionGroup */ public void fillActionBars(IActionBars actionBar) { super.fillActionBars(actionBar); setGlobalActionHandlers(actionBar); } /* (non-Rubydoc) * Method declared in ActionGroup */ public void fillContextMenu(IMenuManager menu) { super.fillContextMenu(menu); appendToGroup(menu, fOpen); if (!fIsEditorOwner) { addOpenWithMenu(menu); } } /* * @see ActionGroup#dispose() */ public void dispose() { ISelectionProvider provider= fSite.getSelectionProvider(); provider.removeSelectionChangedListener(fOpen); super.dispose(); } private void setGlobalActionHandlers(IActionBars actionBars) { actionBars.setGlobalActionHandler(RdtActionConstants.OPEN, fOpen); } private void appendToGroup(IMenuManager menu, IAction action) { if (action.isEnabled()) menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, action); } private void addOpenWithMenu(IMenuManager menu) { ISelection selection= getContext().getSelection(); if (selection.isEmpty() || !(selection instanceof IStructuredSelection)) return; IStructuredSelection ss= (IStructuredSelection)selection; if (ss.size() != 1) return; Object o= ss.getFirstElement(); if (!(o instanceof IAdaptable)) return; IAdaptable element= (IAdaptable)o; Object resource= element.getAdapter(IResource.class); if (!(resource instanceof IFile)) return; // Create a menu. IMenuManager submenu= new MenuManager(ActionMessages.OpenWithMenu_label); submenu.add(new OpenWithMenu(fSite.getPage(), (IFile) resource)); // Add the submenu. menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, submenu); } } |
|
From: Christopher W. <caw...@us...> - 2006-03-30 03:06:23
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31350/src/org/rubypeople/rdt/ui/actions Modified Files: IRubyEditorActionDefinitionIds.java Log Message: Index: IRubyEditorActionDefinitionIds.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/IRubyEditorActionDefinitionIds.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IRubyEditorActionDefinitionIds.java 24 Feb 2006 20:02:25 -0000 1.4 --- IRubyEditorActionDefinitionIds.java 30 Mar 2006 03:06:19 -0000 1.5 *************** *** 43,46 **** --- 43,53 ---- public static final String GOTO_MATCHING_BRACKET= "org.rubypeople.rdt.ui.edit.text.ruby.goto.matching.bracket"; //$NON-NLS-1$ + /** + * Action definition ID of the navigate -> open action + * (value <code>"org.rubypeople.rdt.ui.edit.text.ruby.open.editor"</code>). + */ + public static final String OPEN_EDITOR= "org.rubypeople.rdt.ui.edit.text.ruby.open.editor"; //$NON-NLS-1$ + + } |
|
From: Christopher W. <caw...@us...> - 2006-03-30 03:05:08
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30161/src/org/rubypeople/rdt/ui Modified Files: RubyElementLabels.java PreferenceConstants.java Log Message: Index: PreferenceConstants.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/PreferenceConstants.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PreferenceConstants.java 25 Mar 2006 02:37:44 -0000 1.13 --- PreferenceConstants.java 30 Mar 2006 03:05:01 -0000 1.14 *************** *** 10,14 **** public class PreferenceConstants { ! private PreferenceConstants() { } --- 10,14 ---- public class PreferenceConstants { ! private PreferenceConstants() { } *************** *** 23,26 **** --- 23,44 ---- private final static String DEFAULT_RI_CMD = "ri"; //$NON-NLS-1$ + /** + * A named preference that controls parameter names rendering of methods in the UI. + * <p> + * Value is of type <code>Boolean</code>: if <code>true</code> return names + * are rendered + * </p> + * @since 0.8.0 + */ + public static final String APPEARANCE_METHOD_PARAMETER_NAMES= "org.rubypeople.rdt.ui.methodparameternames";//$NON-NLS-1$ + + /** + * A named preference that specifies whether children of a ruby script are shown in the package explorer. + * <p> + * Value is of type <code>Boolean</code>. + * </p> + */ + public static final String SHOW_CU_CHILDREN= "org.rubypeople.rdt.ui.packages.rubyscriptchildren"; //$NON-NLS-1$ + /** * A named preference that controls whether folding is enabled in the Ruby *************** *** 232,235 **** --- 250,285 ---- */ public static final String BROWSING_STACK_VERTICALLY= "org.rubypeople.rdt.ui.browsing.stackVertically"; //$NON-NLS-1$ + + /** + * A named preference that controls whether the projects view's selection is + * linked to the active editor. + * <p> + * Value is of type <code>Boolean</code>. + * </p> + * @since 0.8.0 + */ + public static final String LINK_BROWSING_PROJECTS_TO_EDITOR= "org.rubypeople.rdt.ui.browsing.projectstoeditor"; //$NON-NLS-1$ + + /** + * A named preference that controls whether the types view's selection is + * linked to the active editor. + * <p> + * Value is of type <code>Boolean</code>. + * </p> + * @since 0.8.0 + */ + public static final String LINK_BROWSING_TYPES_TO_EDITOR= "org.rubypeople.rdt.ui.browsing.typestoeditor"; //$NON-NLS-1$ + + + /** + * A named preference that controls whether the members view's selection is + * linked to the active editor. + * <p> + * Value is of type <code>Boolean</code>. + * </p> + * @since 0.8.0 + */ + public static final String LINK_BROWSING_MEMBERS_TO_EDITOR= "org.rubypeople.rdt.ui.browsing.memberstoeditor"; //$NON-NLS-1$ + public static void initializeDefaultValues(IPreferenceStore store) { *************** *** 241,244 **** --- 291,298 ---- store.setDefault(PreferenceConstants.FORMATTER_PROFILE, ProfileManager.DEFAULT_PROFILE); + + store.setDefault(PreferenceConstants.LINK_BROWSING_PROJECTS_TO_EDITOR, true); + store.setDefault(PreferenceConstants.LINK_BROWSING_TYPES_TO_EDITOR, true); + store.setDefault(PreferenceConstants.LINK_BROWSING_MEMBERS_TO_EDITOR, true); // MembersOrderPreferencePage Index: RubyElementLabels.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/RubyElementLabels.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RubyElementLabels.java 25 Mar 2006 02:37:43 -0000 1.2 --- RubyElementLabels.java 30 Mar 2006 03:05:01 -0000 1.3 *************** *** 233,241 **** */ public final static String ELLIPSIS_STRING = "..."; //$NON-NLS-1$ - /** - * User-readable string for the default package name (e.g. "(default - * package)"). - */ - public final static String DEFAULT_PACKAGE = RubyUIMessages.RubyElementLabels_default_package; private final static long QUALIFIER_FLAGS = P_COMPRESSED | USE_RESOLVED; --- 233,236 ---- |
|
From: Christopher W. <caw...@us...> - 2006-03-30 03:03:43
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29442/src/org/rubypeople/rdt/internal/ui/actions Modified Files: ActionMessages.java ActionMessages.properties Added Files: CompositeActionGroup.java LexicalSortingAction.java Log Message: Index: ActionMessages.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/ActionMessages.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ActionMessages.java 28 Mar 2006 23:15:47 -0000 1.2 --- ActionMessages.java 30 Mar 2006 03:03:38 -0000 1.3 *************** *** 48,51 **** --- 48,52 ---- public static String ActionUtil_notOnBuildPath_title; public static String ActionUtil_notOnBuildPath_message; + public static String OpenWithMenu_label; static { --- NEW FILE: LexicalSortingAction.java --- /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.rubypeople.rdt.internal.ui.actions; import org.eclipse.jface.action.Action; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.ui.PlatformUI; import org.rubypeople.rdt.internal.ui.IRubyHelpContextIds; import org.rubypeople.rdt.internal.ui.RubyPlugin; import org.rubypeople.rdt.internal.ui.RubyPluginImages; import org.rubypeople.rdt.internal.ui.browsing.RubyBrowsingMessages; import org.rubypeople.rdt.internal.ui.viewsupport.SourcePositionSorter; import org.rubypeople.rdt.ui.RubyElementSorter; /* * XXX: This class should become part of the MemberFilterActionGroup * which should be renamed to MemberActionsGroup */ public class LexicalSortingAction extends Action { private RubyElementSorter fSorter= new RubyElementSorter(); private SourcePositionSorter fSourcePositonSorter= new SourcePositionSorter(); private StructuredViewer fViewer; private String fPreferenceKey; public LexicalSortingAction(StructuredViewer viewer, String id) { super(); fViewer= viewer; fPreferenceKey= "LexicalSortingAction." + id + ".isChecked"; //$NON-NLS-1$ //$NON-NLS-2$ setText(RubyBrowsingMessages.LexicalSortingAction_label); RubyPluginImages.setLocalImageDescriptors(this, "alphab_sort_co.gif"); //$NON-NLS-1$ setToolTipText(RubyBrowsingMessages.LexicalSortingAction_tooltip); setDescription(RubyBrowsingMessages.LexicalSortingAction_description); boolean checked= RubyPlugin.getDefault().getPreferenceStore().getBoolean(fPreferenceKey); valueChanged(checked, false); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IRubyHelpContextIds.LEXICAL_SORTING_BROWSING_ACTION); } public void run() { valueChanged(isChecked(), true); } private void valueChanged(final boolean on, boolean store) { setChecked(on); BusyIndicator.showWhile(fViewer.getControl().getDisplay(), new Runnable() { public void run() { if (on) fViewer.setSorter(fSorter); else fViewer.setSorter(fSourcePositonSorter); } }); if (store) RubyPlugin.getDefault().getPreferenceStore().setValue(fPreferenceKey, on); } } Index: ActionMessages.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/ActionMessages.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ActionMessages.properties 24 Feb 2006 20:01:58 -0000 1.2 --- ActionMessages.properties 30 Mar 2006 03:03:38 -0000 1.3 *************** *** 11,14 **** --- 11,26 ---- ############################################################################### + OpenWithMenu_label=Open Wit&h + + 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_message=Cannot open default editor. + OpenAction_error_messageArgs=Cannot open default editor on {0}. {1} + OpenAction_error_messageProblems=Problems Opening Editor + MemberFilterActionGroup_hide_fields_label=Hide Fiel&ds MemberFilterActionGroup_hide_fields_tooltip=Hide Fields *************** *** 31,32 **** --- 43,46 ---- ToggleLinkingAction_description=Link with active editor + ActionUtil_notOnBuildPath_title=Cannot Perform Operation + ActionUtil_notOnBuildPath_message=The resource is not on the build path of a Ruby project. --- NEW FILE: CompositeActionGroup.java --- /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.rubypeople.rdt.internal.ui.actions; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.util.Assert; import org.eclipse.ui.IActionBars; import org.eclipse.ui.actions.ActionContext; import org.eclipse.ui.actions.ActionGroup; public class CompositeActionGroup extends ActionGroup { private ActionGroup[] fGroups; public CompositeActionGroup() { } public CompositeActionGroup(ActionGroup[] groups) { setGroups(groups); } protected void setGroups(ActionGroup[] groups) { Assert.isTrue(fGroups == null); Assert.isNotNull(groups); fGroups= groups; } public ActionGroup get(int index) { if (fGroups == null) return null; return fGroups[index]; } public void addGroup(ActionGroup group) { if (fGroups == null) { fGroups= new ActionGroup[] { group }; } else { ActionGroup[] newGroups= new ActionGroup[fGroups.length + 1]; System.arraycopy(fGroups, 0, newGroups, 0, fGroups.length); newGroups[fGroups.length]= group; fGroups= newGroups; } } public void dispose() { super.dispose(); if (fGroups == null) return; for (int i= 0; i < fGroups.length; i++) { fGroups[i].dispose(); } } public void fillActionBars(IActionBars actionBars) { super.fillActionBars(actionBars); if (fGroups == null) return; for (int i= 0; i < fGroups.length; i++) { fGroups[i].fillActionBars(actionBars); } } public void fillContextMenu(IMenuManager menu) { super.fillContextMenu(menu); if (fGroups == null) return; for (int i= 0; i < fGroups.length; i++) { fGroups[i].fillContextMenu(menu); } } public void setContext(ActionContext context) { super.setContext(context); if (fGroups == null) return; for (int i= 0; i < fGroups.length; i++) { fGroups[i].setContext(context); } } public void updateActionBars() { super.updateActionBars(); if (fGroups == null) return; for (int i= 0; i < fGroups.length; i++) { fGroups[i].updateActionBars(); } } } |
|
From: Christopher W. <caw...@us...> - 2006-03-30 02:58:36
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26415/src/org/rubypeople/rdt/internal/corext/util Modified Files: RubyModelUtil.java Log Message: add toOriginal method Index: RubyModelUtil.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/RubyModelUtil.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RubyModelUtil.java 17 Feb 2006 20:25:21 -0000 1.2 --- RubyModelUtil.java 30 Mar 2006 02:58:30 -0000 1.3 *************** *** 4,7 **** --- 4,8 ---- package org.rubypeople.rdt.internal.corext.util; + import org.rubypeople.rdt.core.IRubyElement; import org.rubypeople.rdt.core.IRubyScript; import org.rubypeople.rdt.core.RubyModelException; *************** *** 51,53 **** --- 52,62 ---- null /* no progress monitor */); } + + /** + * Returns the original element if the given element is a working copy. If the cu is already + * an original the input element is returned. The returned element might not exist + */ + public static IRubyElement toOriginal(IRubyElement element) { + return element.getPrimaryElement(); + } } |
|
From: Christopher W. <caw...@us...> - 2006-03-30 02:57:33
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25867/src/org/rubypeople/rdt/internal/ui Modified Files: RubyUIMessages.java RubyUIMessages.properties Log Message: Index: RubyUIMessages.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyUIMessages.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RubyUIMessages.java 10 Feb 2006 20:14:19 -0000 1.3 --- RubyUIMessages.java 30 Mar 2006 02:57:27 -0000 1.4 *************** *** 14,18 **** public static String StatusBarUpdater_num_elements_selected; - public static String RubyElementLabels_default_package; public static String RubyElementLabels_anonym_type; public static String RubyElementLabels_anonym; --- 14,17 ---- Index: RubyUIMessages.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyUIMessages.properties,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** RubyUIMessages.properties 10 Feb 2006 20:14:19 -0000 1.13 --- RubyUIMessages.properties 30 Mar 2006 02:57:27 -0000 1.14 *************** *** 126,129 **** --- 126,142 ---- ToggleMenuRubyFilesOnly.Tooltip=If this is enabled, only ruby resources are shown. If it is disabled, the common filter rules apply. + + ########### + ## viewsupport + ########### + RubyImageLabelprovider_assert_wrongImage=no image for this Ruby element type + + RubyElementLabels_anonym_type=new {0}() '{'...} + RubyElementLabels_anonym=new Anonymous + RubyElementLabels_initializer={...} + RubyElementLabels_concat_string=\ -\ + RubyElementLabels_comma_string=,\ + RubyElementLabels_declseparator_string=\ :\ + ######### # misc |
|
From: Christopher W. <caw...@us...> - 2006-03-30 02:56:48
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25450/src/org/rubypeople/rdt/internal/ui/preferences Modified Files: PreferencesMessages.java PreferencesMessages.properties Added Files: AppearancePreferencePage.java Log Message: new appearance preference page Index: PreferencesMessages.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/PreferencesMessages.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PreferencesMessages.java 10 Feb 2006 19:52:26 -0000 1.3 --- PreferencesMessages.java 30 Mar 2006 02:56:45 -0000 1.4 *************** *** 69,72 **** --- 69,78 ---- public static String TodoTaskConfigurationBlock_needsfullbuild_message; public static String TodoTaskConfigurationBlock_needsprojectbuild_message; + public static String AppearancePreferencePage_note; + public static String AppearancePreferencePage_preferenceOnlyEffectiveForNewPerspectives; + public static String AppearancePreferencePage_methodtypeparams_label; + public static String AppearancePreferencePage_showMembersInPackagesView; + public static String AppearancePreferencePage_stackViewsVerticallyInTheRubyBrowsingPerspective; + public static String AppearancePreferencePage_description; static { Index: PreferencesMessages.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/PreferencesMessages.properties,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PreferencesMessages.properties 10 Feb 2006 19:52:26 -0000 1.6 --- PreferencesMessages.properties 30 Mar 2006 02:56:45 -0000 1.7 *************** *** 60,65 **** MembersOrderPreferencePage_constructors_label=Constructors MembersOrderPreferencePage_methods_label=Methods ! MembersOrderPreferencePage_staticfields_label=Static Fields ! MembersOrderPreferencePage_staticmethods_label=Static Methods MembersOrderPreferencePage_types_label=Types MembersOrderPreferencePage_public_label=Public --- 60,65 ---- MembersOrderPreferencePage_constructors_label=Constructors MembersOrderPreferencePage_methods_label=Methods ! MembersOrderPreferencePage_staticfields_label=Class Variables ! MembersOrderPreferencePage_staticmethods_label=Class Methods MembersOrderPreferencePage_types_label=Types MembersOrderPreferencePage_public_label=Public *************** *** 71,72 **** --- 71,81 ---- RiPreferencePage_ripath_label=R&i path: RiPreferencePage_rdocpath_label=&RDoc path: + + AppearancePreferencePage_description= Appearance of Ruby elements in viewers: + AppearancePreferencePage_note=Note: + + AppearancePreferencePage_methodtypeparams_label=Show method pa&rameter names + AppearancePreferencePage_showMembersInPackagesView=S&how members in Package Explorer + AppearancePreferencePage_stackViewsVerticallyInTheRubyBrowsingPerspective=&Stack views vertically in the Ruby Browsing perspective + AppearancePreferencePage_preferenceOnlyEffectiveForNewPerspectives=This preference will only take effect on new perspectives + --- NEW FILE: AppearancePreferencePage.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.preferences; import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.PreferencePage; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.PlatformUI; import org.rubypeople.rdt.internal.ui.IRubyHelpContextIds; import org.rubypeople.rdt.internal.ui.RubyPlugin; import org.rubypeople.rdt.internal.ui.dialogs.StatusInfo; import org.rubypeople.rdt.internal.ui.dialogs.StatusUtil; import org.rubypeople.rdt.internal.ui.wizards.dialogfields.DialogField; import org.rubypeople.rdt.internal.ui.wizards.dialogfields.IDialogFieldListener; import org.rubypeople.rdt.internal.ui.wizards.dialogfields.SelectionButtonDialogField; import org.rubypeople.rdt.internal.ui.wizards.dialogfields.Separator; import org.rubypeople.rdt.ui.PreferenceConstants; public class AppearancePreferencePage extends PreferencePage implements IWorkbenchPreferencePage { private static final String SHOW_CU_CHILDREN= PreferenceConstants.SHOW_CU_CHILDREN; private static final String PREF_METHOD_PARAMETER_NAMES= PreferenceConstants.APPEARANCE_METHOD_PARAMETER_NAMES; private static final String STACK_BROWSING_VIEWS_VERTICALLY= PreferenceConstants.BROWSING_STACK_VERTICALLY; private SelectionButtonDialogField fStackBrowsingViewsVertically; private SelectionButtonDialogField fShowMembersInPackageView; private SelectionButtonDialogField fShowMethodParameterNames; public AppearancePreferencePage() { setPreferenceStore(RubyPlugin.getDefault().getPreferenceStore()); setDescription(PreferencesMessages.AppearancePreferencePage_description); IDialogFieldListener listener= new IDialogFieldListener() { public void dialogFieldChanged(DialogField field) { doDialogFieldChanged(field); } }; fShowMethodParameterNames= new SelectionButtonDialogField(SWT.CHECK); fShowMethodParameterNames.setDialogFieldListener(listener); fShowMethodParameterNames.setLabelText(PreferencesMessages.AppearancePreferencePage_methodtypeparams_label); fShowMembersInPackageView= new SelectionButtonDialogField(SWT.CHECK); fShowMembersInPackageView.setDialogFieldListener(listener); fShowMembersInPackageView.setLabelText(PreferencesMessages.AppearancePreferencePage_showMembersInPackagesView); fStackBrowsingViewsVertically= new SelectionButtonDialogField(SWT.CHECK); fStackBrowsingViewsVertically.setDialogFieldListener(listener); fStackBrowsingViewsVertically.setLabelText(PreferencesMessages.AppearancePreferencePage_stackViewsVerticallyInTheRubyBrowsingPerspective); } private void initFields() { IPreferenceStore prefs= getPreferenceStore(); fShowMethodParameterNames.setSelection(prefs.getBoolean(PREF_METHOD_PARAMETER_NAMES)); fShowMembersInPackageView.setSelection(prefs.getBoolean(SHOW_CU_CHILDREN)); fStackBrowsingViewsVertically.setSelection(prefs.getBoolean(STACK_BROWSING_VIEWS_VERTICALLY)); } /* * @see PreferencePage#createControl(Composite) */ public void createControl(Composite parent) { super.createControl(parent); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IRubyHelpContextIds.APPEARANCE_PREFERENCE_PAGE); } /* * @see PreferencePage#createContents(Composite) */ protected Control createContents(Composite parent) { initializeDialogUnits(parent); int nColumns= 1; Composite result= new Composite(parent, SWT.NONE); result.setFont(parent.getFont()); GridLayout layout= new GridLayout(); layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth= 0; layout.numColumns= nColumns; result.setLayout(layout); fShowMethodParameterNames.doFillIntoGrid(result, nColumns); fShowMembersInPackageView.doFillIntoGrid(result, nColumns); new Separator().doFillIntoGrid(result, nColumns); fStackBrowsingViewsVertically.doFillIntoGrid(result, nColumns); String noteTitle= PreferencesMessages.AppearancePreferencePage_note; String noteMessage= PreferencesMessages.AppearancePreferencePage_preferenceOnlyEffectiveForNewPerspectives; Composite noteControl= createNoteComposite(JFaceResources.getDialogFont(), result, noteTitle, noteMessage); GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.horizontalSpan= 2; noteControl.setLayoutData(gd); initFields(); Dialog.applyDialogFont(result); return result; } private void doDialogFieldChanged(DialogField field) { updateStatus(getValidationStatus()); } private IStatus getValidationStatus(){ return new StatusInfo(); } private void updateStatus(IStatus status) { setValid(!status.matches(IStatus.ERROR)); StatusUtil.applyToStatusLine(this, status); } /* * @see IWorkbenchPreferencePage#init(IWorkbench) */ public void init(IWorkbench workbench) { } /* * @see IPreferencePage#performOk() */ public boolean performOk() { IPreferenceStore prefs= getPreferenceStore(); prefs.setValue(PREF_METHOD_PARAMETER_NAMES, fShowMethodParameterNames.isSelected()); prefs.setValue(SHOW_CU_CHILDREN, fShowMembersInPackageView.isSelected()); prefs.setValue(STACK_BROWSING_VIEWS_VERTICALLY, fStackBrowsingViewsVertically.isSelected()); RubyPlugin.getDefault().savePluginPreferences(); return super.performOk(); } /* * @see PreferencePage#performDefaults() */ protected void performDefaults() { IPreferenceStore prefs= getPreferenceStore(); fShowMethodParameterNames.setSelection(prefs.getDefaultBoolean(PREF_METHOD_PARAMETER_NAMES)); fShowMembersInPackageView.setSelection(prefs.getDefaultBoolean(SHOW_CU_CHILDREN)); fStackBrowsingViewsVertically.setSelection(prefs.getDefaultBoolean(STACK_BROWSING_VIEWS_VERTICALLY)); super.performDefaults(); } } |
|
From: Christopher W. <caw...@us...> - 2006-03-30 02:55:14
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/viewsupport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24707/src/org/rubypeople/rdt/internal/ui/viewsupport Added Files: SourcePositionSorter.java Log Message: --- NEW FILE: SourcePositionSorter.java --- /******************************************************************************* * Copyright (c) 2000, 2006 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.viewsupport; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerSorter; import org.rubypeople.rdt.core.IRubyElement; import org.rubypeople.rdt.core.ISourceRange; import org.rubypeople.rdt.core.ISourceReference; import org.rubypeople.rdt.core.RubyModelException; /** * Viewer sorter which sorts the Ruby elements like * they appear in the source. * * @since 0.8.0 */ public class SourcePositionSorter extends ViewerSorter { /* * @see org.eclipse.jface.viewers.ViewerSorter#compare(org.eclipse.jface.viewers.Viewer, Ruby.lang.Object, Ruby.lang.Object) */ public int compare(Viewer viewer, Object e1, Object e2) { if (!(e1 instanceof ISourceReference)) return 0; if (!(e2 instanceof ISourceReference)) return 0; if (((IRubyElement)e1).getParent() != ((IRubyElement)e2).getParent()) return 0; try { ISourceRange sr1= ((ISourceReference)e1).getSourceRange(); ISourceRange sr2= ((ISourceReference)e2).getSourceRange(); if (sr1 == null || sr2 == null) return 0; return sr1.getOffset() - sr2.getOffset(); } catch (RubyModelException e) { return 0; } } } |
|
From: Christopher W. <caw...@us...> - 2006-03-30 02:49:38
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/wizards/dialogfields In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21143/src/org/rubypeople/rdt/internal/ui/wizards/dialogfields Added Files: Separator.java Log Message: needed by new appearance page --- NEW FILE: Separator.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.wizards.dialogfields; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.layout.GridData; /** * Dialog field describing a separator. */ public class Separator extends DialogField { private Label fSeparator; private int fStyle; public Separator() { this(SWT.NONE); } /** * @param style of the separator. See <code>Label</code> for possible * styles. */ public Separator(int style) { super(); fStyle= style; } // ------- layout helpers /** * Creates the separator and fills it in a MGridLayout. * @param height The height of the separator */ public Control[] doFillIntoGrid(Composite parent, int nColumns, int height) { assertEnoughColumns(nColumns); Control separator= getSeparator(parent); separator.setLayoutData(gridDataForSeperator(nColumns, height)); return new Control[] { separator }; } /* * @see DialogField#doFillIntoGrid */ public Control[] doFillIntoGrid(Composite parent, int nColumns) { return doFillIntoGrid(parent, nColumns, 4); } /* * @see DialogField#getNumberOfControls */ public int getNumberOfControls() { return 1; } protected static GridData gridDataForSeperator(int span, int height) { GridData gd= new GridData(); gd.horizontalAlignment= GridData.FILL; gd.verticalAlignment= GridData.BEGINNING; gd.heightHint= height; gd.horizontalSpan= span; return gd; } // ------- ui creation /** * Creates or returns the created separator. * @param parent The parent composite or <code>null</code> if the widget has * already been created. */ public Control getSeparator(Composite parent) { if (fSeparator == null) { assertCompositeNotNull(parent); fSeparator= new Label(parent, fStyle); } return fSeparator; } } |
|
From: Christopher W. <caw...@us...> - 2006-03-29 22:48:13
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/icons/full/eview16 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31572/icons/full/eview16 Modified Files: browse_persp.gif projects.gif Log Message: tailor icons to be ruby specific Index: projects.gif =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/icons/full/eview16/projects.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvskrPGko and /tmp/cvsJiH9N0 differ Index: browse_persp.gif =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/icons/full/eview16/browse_persp.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsA0aPCr and /tmp/cvsG7Fhe4 differ |
|
From: Christopher W. <caw...@us...> - 2006-03-29 22:46:55
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30567/src/org/rubypeople/rdt/internal/core Modified Files: Openable.java Log Message: simple beginnings of a selection engine / codeSelect Index: Openable.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/Openable.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Openable.java 28 Mar 2006 23:15:43 -0000 1.8 --- Openable.java 29 Mar 2006 22:46:52 -0000 1.9 *************** *** 356,360 **** } ! SelectionEngine engine = new SelectionEngine(this); return engine.select(cu, offset, offset + length - 1); } --- 356,360 ---- } ! SelectionEngine engine = new SelectionEngine(); return engine.select(cu, offset, offset + length - 1); } |
|
From: Christopher W. <caw...@us...> - 2006-03-29 22:46:55
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30567/src/org/rubypeople/rdt/internal/codeassist Modified Files: SelectionEngine.java Added Files: SelectionVisitor.java Log Message: simple beginnings of a selection engine / codeSelect Index: SelectionEngine.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/SelectionEngine.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SelectionEngine.java 28 Mar 2006 23:15:43 -0000 1.1 --- SelectionEngine.java 29 Mar 2006 22:46:52 -0000 1.2 *************** *** 1,20 **** ! package org.rubypeople.rdt.internal.codeassist; ! ! import org.rubypeople.rdt.core.IRubyElement; ! import org.rubypeople.rdt.core.IRubyScript; ! import org.rubypeople.rdt.internal.core.Openable; ! ! public class SelectionEngine { ! ! private Openable openable; ! ! public SelectionEngine(Openable openable) { ! this.openable = openable; ! } ! ! public IRubyElement[] select(IRubyScript cu, int start, int end) { ! // TODO Auto-generated method stub ! return new IRubyElement[0]; ! } ! ! } --- 1,25 ---- ! package org.rubypeople.rdt.internal.codeassist; ! ! import java.io.CharArrayReader; ! ! import org.eclipse.core.resources.IFile; ! import org.jruby.ast.Node; ! import org.rubypeople.rdt.core.IRubyElement; ! import org.rubypeople.rdt.core.IRubyScript; ! import org.rubypeople.rdt.core.RubyModelException; ! import org.rubypeople.rdt.internal.core.parser.RubyParser; ! ! public class SelectionEngine { ! ! public IRubyElement[] select(IRubyScript script, int start, int end) throws RubyModelException { ! char[] contents = script.getBuffer().getCharacters(); ! RubyParser parser = new RubyParser(); ! Node node = parser.parse((IFile) script.getResource(), new CharArrayReader(contents)); ! ! SelectionVisitor visitor = new SelectionVisitor(script, start, end); ! if (node != null) node.accept(visitor); ! ! return visitor.getElements(); ! } ! ! } --- NEW FILE: SelectionVisitor.java --- package org.rubypeople.rdt.internal.codeassist; import java.util.ArrayList; import java.util.List; import org.jruby.ast.AliasNode; import org.jruby.ast.AndNode; import org.jruby.ast.ArgsCatNode; import org.jruby.ast.ArgsNode; import org.jruby.ast.ArrayNode; import org.jruby.ast.BackRefNode; import org.jruby.ast.BeginNode; import org.jruby.ast.BignumNode; import org.jruby.ast.BlockArgNode; import org.jruby.ast.BlockNode; import org.jruby.ast.BlockPassNode; import org.jruby.ast.BreakNode; import org.jruby.ast.CallNode; import org.jruby.ast.CaseNode; import org.jruby.ast.ClassNode; import org.jruby.ast.ClassVarAsgnNode; import org.jruby.ast.ClassVarDeclNode; import org.jruby.ast.ClassVarNode; import org.jruby.ast.Colon2Node; import org.jruby.ast.Colon3Node; import org.jruby.ast.ConstDeclNode; import org.jruby.ast.ConstNode; import org.jruby.ast.DAsgnNode; import org.jruby.ast.DRegexpNode; import org.jruby.ast.DStrNode; import org.jruby.ast.DSymbolNode; import org.jruby.ast.DVarNode; import org.jruby.ast.DXStrNode; import org.jruby.ast.DefinedNode; import org.jruby.ast.DefnNode; import org.jruby.ast.DefsNode; import org.jruby.ast.DotNode; import org.jruby.ast.EnsureNode; import org.jruby.ast.EvStrNode; import org.jruby.ast.FCallNode; import org.jruby.ast.FalseNode; import org.jruby.ast.FixnumNode; import org.jruby.ast.FlipNode; import org.jruby.ast.FloatNode; import org.jruby.ast.ForNode; import org.jruby.ast.GlobalAsgnNode; import org.jruby.ast.GlobalVarNode; import org.jruby.ast.HashNode; import org.jruby.ast.IfNode; import org.jruby.ast.InstAsgnNode; import org.jruby.ast.InstVarNode; import org.jruby.ast.IterNode; import org.jruby.ast.LocalAsgnNode; import org.jruby.ast.LocalVarNode; import org.jruby.ast.Match2Node; import org.jruby.ast.Match3Node; import org.jruby.ast.MatchNode; import org.jruby.ast.ModuleNode; import org.jruby.ast.MultipleAsgnNode; import org.jruby.ast.NewlineNode; import org.jruby.ast.NextNode; import org.jruby.ast.NilNode; import org.jruby.ast.NotNode; import org.jruby.ast.NthRefNode; import org.jruby.ast.OpAsgnAndNode; import org.jruby.ast.OpAsgnNode; import org.jruby.ast.OpAsgnOrNode; import org.jruby.ast.OpElementAsgnNode; import org.jruby.ast.OptNNode; import org.jruby.ast.OrNode; import org.jruby.ast.PostExeNode; import org.jruby.ast.RedoNode; import org.jruby.ast.RegexpNode; import org.jruby.ast.RescueBodyNode; import org.jruby.ast.RescueNode; import org.jruby.ast.RetryNode; import org.jruby.ast.ReturnNode; import org.jruby.ast.SClassNode; import org.jruby.ast.SValueNode; import org.jruby.ast.ScopeNode; import org.jruby.ast.SelfNode; import org.jruby.ast.SplatNode; import org.jruby.ast.StrNode; import org.jruby.ast.SuperNode; import org.jruby.ast.SymbolNode; import org.jruby.ast.ToAryNode; import org.jruby.ast.TrueNode; import org.jruby.ast.UndefNode; import org.jruby.ast.UntilNode; import org.jruby.ast.VAliasNode; import org.jruby.ast.VCallNode; import org.jruby.ast.WhenNode; import org.jruby.ast.WhileNode; import org.jruby.ast.XStrNode; import org.jruby.ast.YieldNode; import org.jruby.ast.ZArrayNode; import org.jruby.ast.ZSuperNode; import org.jruby.ast.visitor.NodeVisitor; import org.jruby.evaluator.Instruction; import org.jruby.lexer.yacc.ISourcePosition; import org.rubypeople.rdt.core.IRubyElement; import org.rubypeople.rdt.core.IRubyScript; import org.rubypeople.rdt.core.IType; public class SelectionVisitor implements NodeVisitor { private int end; private int start; private IRubyScript script; private String currentTypeName; private List elements; public SelectionVisitor(IRubyScript script, int start, int end) { this.script = script; this.start = start; this.end = end; this.currentTypeName = "Object"; this.elements = new ArrayList(); } public Instruction visitAliasNode(AliasNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitAndNode(AndNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitArgsNode(ArgsNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitArgsCatNode(ArgsCatNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitArrayNode(ArrayNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitBackRefNode(BackRefNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitBeginNode(BeginNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitBignumNode(BignumNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitBlockArgNode(BlockArgNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitBlockNode(BlockNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitBlockPassNode(BlockPassNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitBreakNode(BreakNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitConstDeclNode(ConstDeclNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitClassVarAsgnNode(ClassVarAsgnNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitClassVarDeclNode(ClassVarDeclNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitClassVarNode(ClassVarNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitCallNode(CallNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitCaseNode(CaseNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitClassNode(ClassNode iVisited) { // TODO Push type names on a stack String oldTypeName = currentTypeName; currentTypeName = getName(iVisited.getCPath()); iVisited.getBodyNode().accept(this); currentTypeName = oldTypeName; return null; } private String getName(Colon2Node path) { // TODO Get full name return path.getName(); } public Instruction visitColon2Node(Colon2Node iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitColon3Node(Colon3Node iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitConstNode(ConstNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitDAsgnNode(DAsgnNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitDRegxNode(DRegexpNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitDStrNode(DStrNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitDSymbolNode(DSymbolNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitDVarNode(DVarNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitDXStrNode(DXStrNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitDefinedNode(DefinedNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitDefnNode(DefnNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitDefsNode(DefsNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitDotNode(DotNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitEnsureNode(EnsureNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitEvStrNode(EvStrNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitFCallNode(FCallNode iVisited) { // TODO Auto-generated method stub ISourcePosition pos = iVisited.getPosition(); if ((start >= pos.getStartOffset()) && (end <= pos.getEndOffset())) { String methodName = iVisited.getName(); IType type = script.getType(currentTypeName); int argCount = 0; elements.add(type.getMethod(methodName, new String[] {})); } return null; } public Instruction visitFalseNode(FalseNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitFixnumNode(FixnumNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitFlipNode(FlipNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitFloatNode(FloatNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitForNode(ForNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitGlobalAsgnNode(GlobalAsgnNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitGlobalVarNode(GlobalVarNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitHashNode(HashNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitInstAsgnNode(InstAsgnNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitInstVarNode(InstVarNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitIfNode(IfNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitIterNode(IterNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitLocalAsgnNode(LocalAsgnNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitLocalVarNode(LocalVarNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitMultipleAsgnNode(MultipleAsgnNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitMatch2Node(Match2Node iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitMatch3Node(Match3Node iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitMatchNode(MatchNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitModuleNode(ModuleNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitNewlineNode(NewlineNode iVisited) { iVisited.getNextNode().accept(this); // TODO Auto-generated method stub return null; } public Instruction visitNextNode(NextNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitNilNode(NilNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitNotNode(NotNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitNthRefNode(NthRefNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitOpElementAsgnNode(OpElementAsgnNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitOpAsgnNode(OpAsgnNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitOpAsgnAndNode(OpAsgnAndNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitOpAsgnOrNode(OpAsgnOrNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitOptNNode(OptNNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitOrNode(OrNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitPostExeNode(PostExeNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitRedoNode(RedoNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitRegexpNode(RegexpNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitRescueBodyNode(RescueBodyNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitRescueNode(RescueNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitRetryNode(RetryNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitReturnNode(ReturnNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitSClassNode(SClassNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitScopeNode(ScopeNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitSelfNode(SelfNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitSplatNode(SplatNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitStrNode(StrNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitSuperNode(SuperNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitSValueNode(SValueNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitSymbolNode(SymbolNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitToAryNode(ToAryNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitTrueNode(TrueNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitUndefNode(UndefNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitUntilNode(UntilNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitVAliasNode(VAliasNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitVCallNode(VCallNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitWhenNode(WhenNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitWhileNode(WhileNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitXStrNode(XStrNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitYieldNode(YieldNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitZArrayNode(ZArrayNode iVisited) { // TODO Auto-generated method stub return null; } public Instruction visitZSuperNode(ZSuperNode iVisited) { // TODO Auto-generated method stub return null; } public IRubyElement[] getElements() { IRubyElement[] elem = new IRubyElement[elements.size()]; for (int i = 0; i < elements.size(); i++) { elem[i] = (IRubyElement) elements.get(i); } return elem; } } |