|
From: Christopher W. <caw...@us...> - 2006-02-10 19:58:39
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13010/src/org/rubypeople/rdt/internal/ui/actions Added Files: SelectionConverter.java ActionMessages.java ActionMessages.properties AbstractToggleLinkingAction.java Log Message: toggle linking to editor from outline view --- NEW FILE: ActionMessages.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.osgi.util.NLS; public final class ActionMessages extends NLS { private static final String BUNDLE_NAME= ActionMessages.class.getName();//$NON-NLS-1$ private ActionMessages() { // Do not instantiate } public static String ToggleLinkingAction_label; public static String ToggleLinkingAction_tooltip; public static String ToggleLinkingAction_description; public static String MemberFilterActionGroup_hide_fields_label; public static String MemberFilterActionGroup_hide_fields_tooltip; public static String MemberFilterActionGroup_hide_fields_description; public static String MemberFilterActionGroup_hide_static_label; public static String MemberFilterActionGroup_hide_static_tooltip; public static String MemberFilterActionGroup_hide_static_description; public static String MemberFilterActionGroup_hide_nonpublic_label; public static String MemberFilterActionGroup_hide_nonpublic_tooltip; public static String MemberFilterActionGroup_hide_nonpublic_description; public static String MemberFilterActionGroup_hide_localtypes_label; public static String MemberFilterActionGroup_hide_localtypes_tooltip; public static String MemberFilterActionGroup_hide_localtypes_description; static { NLS.initializeMessages(BUNDLE_NAME, ActionMessages.class); } } --- NEW FILE: AbstractToggleLinkingAction.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.ui.PlatformUI; import org.rubypeople.rdt.internal.ui.IRubyHelpContextIds; import org.rubypeople.rdt.internal.ui.RubyPluginImages; /** * This is an action template for actions that toggle whether * it links its selection to the active editor. * * @since 3.0 */ public abstract class AbstractToggleLinkingAction extends Action { /** * Constructs a new action. */ public AbstractToggleLinkingAction() { super(ActionMessages.ToggleLinkingAction_label); setDescription(ActionMessages.ToggleLinkingAction_description); setToolTipText(ActionMessages.ToggleLinkingAction_tooltip); RubyPluginImages.setLocalImageDescriptors(this, "synced.gif"); //$NON-NLS-1$ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IRubyHelpContextIds.LINK_EDITOR_ACTION); } /** * Runs the action. */ public abstract void run(); } --- NEW FILE: ActionMessages.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 # Sebastian Davids <sd...@gm...> - Bug 114276 ############################################################################### OpenWithMenu_label=Open Wit&h RefactorMenu_label=Refac&tor SourceMenu_label=&Source BuildPath_label=&Build Path BuildAction_label=&Build Project RebuildAction_label=Rebuild Pro&ject SelectionConverter_codeResolveOrInput_failed=Could not convert text selection into a Java element SelectionConverter_codeResolve_failed=Could not convert text selection into a Java element OpenAction_label=&Open OpenAction_tooltip=Open an Editor on the Selected Element OpenAction_description=Open an editor on the selected element OpenAction_declaration_label=&Open Declaration OpenAction_select_element=&Select or enter the element to open: OpenAction_error_title=Open OpenAction_error_message=Cannot open default editor. OpenAction_error_messageArgs=Cannot open default editor on {0}. {1} OpenAction_error_messageProblems=Problems Opening Editor OpenAction_error_messageBadSelection=Current text selection does not resolve to a Java element OpenSuperImplementationAction_label=Open S&uper Implementation OpenSuperImplementationAction_tooltip=Open the Implementation in the Super Type OpenSuperImplementationAction_description=Open the Implementation in the Super Type OpenSuperImplementationAction_error_title=Open Super Implementation OpenSuperImplementationAction_error_message=Opening the super implementation failed. Check log for details. OpenSuperImplementationAction_not_applicable=The operation is not applicable to the current selection. Select an overriding method. OpenSuperImplementationAction_no_super_implementation=The super implementation of method ''{0}'' does not exist. OpenTypeHierarchyAction_label=Open Type Hi&erarchy OpenNewClassWizardAction_text=Class OpenNewEnumWizardAction_text=Enum OpenTypeHierarchyAction_tooltip=Open a Type Hierarchy on the Selected Element OpenTypeHierarchyAction_description=Open a type hierarchy on the selected element OpenTypeHierarchyAction_dialog_title=Open Type Hierarchy OpenTypeHierarchyAction_messages_title=Cannot create type hierarchy OpenTypeHierarchyAction_messages_no_java_element=A Java element must be selected. OpenTypeHierarchyAction_messages_no_java_resources=The selected package does not contain any Java resource. OpenTypeHierarchyAction_messages_no_types=The selected compilation unit does not contain a type. OpenNewAnnotationWizardAction_description=Opens the new annotation type wizard OpenNewJavaProjectWizardAction_description=Opens the new Java project wizard OpenNewSourceFolderWizardAction_description=Opens the new Java source folder wizard OpenNewInterfaceWizardAction_description=Opens the new interface wizard OpenTypeHierarchyAction_messages_no_valid_java_element=A valid Java element must be selected. OpenTypeHierarchyAction_messages_unknown_import_decl=The selected import declaration can not be resolved. ShowInPackageViewAction_label=Show in Pac&kage Explorer ShowInPackageViewAction_description=Show the selected element in Package Explorer ShowInPackageViewAction_tooltip=Show in Package Explorer ShowInPackageViewAction_dialog_title=Show In Package Explorer ShowInPackageViewAction_error_message=An internal error occurred. Please see log for details. ShowInNavigatorView_label=Show in &Navigator View ShowInNavigatorView_dialog_title=Show in Navigator View ShowInNavigatorView_dialog_message=Select the element to be opened in the navigator view: ShowInNavigatorView_error_activation_failed=Cannot activate Resource Navigator OverrideMethodsAction_label=O&verride/Implement Methods... OverrideMethodsAction_description=Override or Implement Methods from super types. OverrideMethodsAction_tooltip=Override/Implement Methods OverrideMethodsAction_error_actionfailed=Cannot create methods OverrideMethodsAction_error_title=Override/Implement Methods OverrideMethodsAction_error_nothing_found=No methods to override found for this type. OverrideMethodsAction_error_type_removed_in_editor=Input type has been removed in editor. OverrideMethodsAction_not_applicable=The operation is not applicable to the current selection. Select a class. OverrideMethodsAction_interface_not_applicable=The Override Methods operation is not applicable to interfaces. OverrideMethodsAction_annotation_not_applicable=The Override Methods operation is not applicable to annotations. AddGetterSetterAction_label=Gene&rate Getters and Setters... AddGetterSetterAction_description=Generate Getter and Setter methods for type's fields AddGetterSetterAction_tooltip=Generate Getter and Setter Methods for the Type's Fields AddGetterSetterAction_error_duplicate_methods=Possible duplicate method(s) selected AddGetterSetterAction_no_primary_type_title=Add Setter and Getter AddGetterSetterAction_no_primary_type_message=No primary type found. AddGetterSetterAction_error_title=Generate Getters and Setters AddGetterSetterAction_error_actionfailed=Generating Getters and Setters Failed. AddGetterSetterAction_not_applicable=The operation is not applicable to the current selection. Select a field which is not declared as type variable or a type that declares such fields. AddGetterSetterAction_interface_not_applicable=The Generate Getters and Setters operation is not applicable to interfaces. AddGetterSetterAction_annotation_not_applicable=The Generate Getters and Setters operation is not applicable to annotations. AddGetterSetterAction_QueryDialog_title=Generate Getters and Setters AddGetterSetterAction_SkipSetterForFinalDialog_message=Field ''{0}'' is final.\nDo you want to skip the creation of the setter method? AddGetterSetterAction_SkipExistingDialog_message=Method ''{0}'' already exists.\nSkip creation? AddGetterSetterAction_SkipExistingDialog_skip_label=&Skip AddGetterSetterAction_SkipExistingDialog_replace_label=&Replace AddGetterSetterAction_SkipExistingDialog_skipAll_label=Skip &All AddGetterSetterAction_dialog_label=&Select getters and setters to create: AddGetterSetterAction_methods_selected={0} of {1} selected. AddGettSetterAction_typeContainsNoFields_message=The type contains no fields or all fields have getters/setters already. GetterSetterTreeSelectionDialog_select_getters=Select &Getters GetterSetterTreeSelectionDialog_select_setters=Se&lect Setters GetterSetterTreeSelectionDialog_alpha_pair_sort=Fields in getter/setter pairs GetterSetterTreeSelectionDialog_alpha_method_sort=First getters, then setters GetterSetterTreeSelectionDialog_sort_label=S&ort by: SourceActionDialog_enterAt_label=&Insertion point: SourceActionDialog_modifier_group=Access modifier SourceActionDialog_modifier_public=&public SourceActionDialog_modifier_protected=protec&ted SourceActionDialog_modifier_default=d&efault SourceActionDialog_modifier_private=pri&vate SourceActionDialog_modifier_synchronized=s&ynchronized SourceActionDialog_modifier_final=&final SourceActionDialog_first_method=First method SourceActionDialog_last_method=Last method SourceActionDialog_cursor=Cursor position SourceActionDialog_after=After ''{0}'' SourceActionDialog_createMethodComment=Generate method &comments SourceActionDialog_createMethodAnnotation=Generate '@Override' a&nnotations SourceActionDialog_no_entries=No methods available. SourceActionDialog_createConstructorComment=Generate constructor &comments AddUnimplementedConstructorsAction_label=Add &Constructors from Superclass... AddUnimplementedConstructorsAction_description=Add constructors from superclass AddUnimplementedConstructorsAction_tooltip=Add Constructors from Superclass AddUnimplementedConstructorsAction_error_title=Add Constructors from Superclass AddUnimplementedConstructorsAction_error_type_removed_in_editor=Input type has been removed in editor. AddUnimplementedConstructorsAction_not_applicable=The operation is not applicable to the current selection. Select a class. AddUnimplementedConstructorsAction_interface_not_applicable=The Add Constructors from Superclass operation is not applicable to interfaces. AddUnimplementedConstructorsAction_enum_not_applicable=The Add Constructors from Superclass operation is not applicable to enums. AddUnimplementedConstructorsAction_annotation_not_applicable=The Add Constructors from Superclass operation is not applicable to annotations. AddUnimplementedConstructorsAction_methods_selected={0} of {1} selected. AddUnimplementedConstructorsAction_error_nothing_found=There are no constructors from the superclass which may be added. AddUnimplementedConstructorsAction_dialog_title=Add Constructors from Superclass AddUnimplementedConstructorsAction_dialog_label=&Select constructors to implement: AddUnimplementedConstructorsDialog_omit_super=&Omit call to default constructor super() GenerateConstructorUsingFieldsAction_label=Generate C&onstructor using Fields... GenerateConstructorUsingFieldsAction_description=Generate Constructor using fields GenerateConstructorUsingFieldsAction_tooltip=Generate Constructor Using Fields GenerateConstructorUsingFieldsAction_error_title=Generate Constructor using Fields GenerateConstructorUsingFieldsAction_not_applicable=The operation is not applicable to the current selection. Select a class. GenerateConstructorUsingFieldsAction_fields_selected={0} of {1} selected. GenerateConstructorUsingFieldsAction_error_duplicate_constructor=The constructor to be created is possibly a duplicate GenerateConstructorUsingFieldsAction_error_nothing_found=There are no constructors from the superclass which may be used. GenerateConstructorUsingFieldsAction_dialog_title=Generate Constructor using Fields GenerateConstructorUsingFieldsAction_dialog_label=&Select fields to initialize: GenerateConstructorUsingFieldsAction_interface_not_applicable=The Generate Constructor using Fields operation is not applicable to interfaces. GenerateConstructorUsingFieldsAction_enum_not_applicable=The Generate Constructor using Fields operation is not applicable to enums. GenerateConstructorUsingFieldsAction_annotation_not_applicable=The Generate Constructor using Fields operation is not applicable to annotations. GenerateConstructorUsingFieldsAction_typeContainsNoFields_message=The type contains no fields which may be set. GenerateConstructorUsingFieldsAction_error_actionfailed=Unexpected error while creating constructors. See log for details. GenerateConstructorUsingFieldsAction_error_anonymous_class=Anonymous classes cannot contain explicitely declared constructors. GenerateConstructorUsingFieldsSelectionDialog_up_button=&Up GenerateConstructorUsingFieldsSelectionDialog_down_button=Do&wn GenerateConstructorUsingFieldsSelectionDialog_sort_constructor_choices_label=Select super constructor to invo&ke: GenerateConstructorUsingFieldsSelectionDialog_omit_super=&Omit call to default constructor super() AddJavaDocStubAction_label=Add Commen&t AddJavaDocStubAction_description=Add a comment stub to the member element AddJavaDocStubAction_tooltip=Add a Comment Stub to the Member Element AddJavaDocStubsAction_error_dialogTitle=Add Comment AddJavaDocStubsAction_error_actionFailed=Error while adding comment AddJavaDocStubsAction_not_applicable=The operation is not applicable to the current selection. Select a type or method. ExternalizeStringsAction_label= &Externalize Strings... ExternalizeStringsAction_dialog_title= Externalize Strings ExternalizeStringsAction_dialog_message=Could not open Externalize String Wizard FindStringsToExternalizeAction_label= Find Strings to Externali&ze... FindStringsToExternalizeAction_dialog_title= Find Strings to Externalize FindStringsToExternalizeAction_error_message= Unexpected Exception. See log. FindStringsToExternalizeAction_error_cannotBeParsed= Compilation unit ''{0}'' can not be parsed. FindStringsToExternalizeAction_foundStrings= {0} in {1} FindStringsToExternalizeAction_noStrings= No non-externalized strings found. FindStringsToExternalizeAction_non_externalized= {0} &non-externalized string(s) found. FindStringsToExternalizeAction_button_label= &Externalize... FindStringsToExternalizeAction_find_strings= Finding non-externalized strings... OpenExternalJavadocAction_label=Open E&xternal Javadoc OpenExternalJavadocAction_description=Opens the Javadoc of the selected element in an external browser OpenExternalJavadocAction_tooltip=Opens the Javadoc of the Selected Element in an External Browser OpenExternalJavadocAction_select_element=&Select or enter the element to open: OpenExternalJavadocAction_libraries_no_location=The documentation location for ''{0}'' has not been configured. For elements from libraries specify the Javadoc location URL on the properties page of the parent JAR (''{1}'') OpenExternalJavadocAction_source_no_location=The documentation location for ''{0}'' has not been configured. For elements from source specify the Javadoc location URL on the properties page of the parent project (''{1}'') OpenExternalJavadocAction_no_entry=The documentation does not contain an entry for ''{0}''.\n(File ''{1}'' does not exist.) OpenExternalJavadocAction_opening_failed=Opening Javadoc failed. See log for details OpenExternalJavadocAction_dialog_title=Open External Javadoc OpenExternalJavadocAction_code_resolve_failed=Could not convert text selection into a Java element SelfEncapsulateFieldAction_label=Encap&sulate Field... SelfEncapsulateFieldAction_dialog_title=Encapsulate Field SelfEncapsulateFieldAction_dialog_unavailable=The operation is not applicable to the current selection. Select a field of a class or enum. SelfEncapsulateFieldAction_dialog_cannot_perform=Cannot perform refactoring. See log for more details. OrganizeImportsAction_label=Or&ganize Imports OrganizeImportsAction_tooltip=Evaluate All Required Imports and Replace the Current Imports OrganizeImportsAction_description=Evaluate all required imports and replace the current imports CleanUpAction_label=Clean &Up... CleanUpAction_tooltip=Solve Problems and Improve Code Style on Selected Resources CleanUpAction_description=Solve problems and improve code style on selected resources CleanUpAction_ErrorDialogTitle=Clean Up CleanUpAction_MultiStateErrorTitle=Problems while cleaning up some compilation units. See 'Details' for more information. CleanUpAction_UnexpectedErrorMessage={0}: Unexpected error. See log for details. CleanUpAction_CUNotOnBuildpathMessage={0}: Compilation unit not on build path. No changes applied. OrganizeImportsAction_multi_op_description=Organizing imports... OrganizeImportsAction_multi_error_parse={0}: Compilation unit has parse errors. No changes applied. OrganizeImportsAction_multi_error_unresolvable={0}: Compilation unit contains ambiguous references. User interaction required. OrganizeImportsAction_multi_error_unexpected={0}: Unexpected error. See log for details. OrganizeImportsAction_multi_error_notoncp={0}: Compilation unit not on build path. No changes applied. OrganizeImportsAction_selectiondialog_title=Organize Imports OrganizeImportsAction_selectiondialog_message=&Choose type to import: OrganizeImportsAction_error_title=Organize Imports OrganizeImportsAction_error_message=Unexpected error in organize imports. See log for details. OrganizeImportsAction_single_error_parse=Compilation unit has parse errors: ''{0}''. No changes applied. OrganizeImportsAction_summary_added={0} import(s) added. OrganizeImportsAction_summary_removed={0} import(s) removed. OrganizeImportsAction_multi_status_title=Organize Imports OrganizeImportsAction_multi_status_description=Problems while organizing imports on some compilation units. See 'Details' for more information. FormatAllAction_label=Format FormatAllAction_tooltip=Format all selected Java files FormatAllAction_description=Format all selected Java files FormatAllAction_status_description=Problems while formatting some compilation units. See 'Details' for more information. FormatAllAction_multi_status_title=Format FormatAllAction_error_title=Format FormatAllAction_error_message=Unexpected error while formatting. See log for details. FormatAllAction_operation_description=Formatting... FormatAllAction_failedvalidateedit_title=Format FormatAllAction_failedvalidateedit_message=Problems while accessing selected files. FormatAllAction_noundo_title=Format FormatAllAction_noundo_message='Undo' is not supported by this operation. Do you want to continue? SortMembersAction_label=Sort &Members SortMembersAction_tooltip=Sorts all Members using the Member Order Preference SortMembersAction_description=Sorts all members using the member order preference SortMembersAction_dialog_title=Sort Members SortMembersAction_not_applicable=Operation not applicable to current text editor. SortMembersAction_containsmarkers=Markers like bookmarks, breakpoints, or user defined tasks in a reordered member will be lost. OK to continue? SortMembersAction_no_members=There are not enough members in this type to sort. OpenBrowserUtil_help_not_available=Help support not available OpenNewAnnotationWizardAction_text=Annotation OpenNewPackageWizardAction_tooltip=Opens the new Java package wizard OpenNewClassWizardAction_tooltip=Opens the new class wizard OpenNewInterfaceWizardAction_text=Interface OpenNewEnumWizardAction_tooltip=Opens the new enum type wizard OpenNewPackageWizardAction_text=Package MemberFilterActionGroup_hide_fields_label=Hide Fiel&ds MemberFilterActionGroup_hide_fields_tooltip=Hide Fields MemberFilterActionGroup_hide_fields_description=Toggles the visibility of fields MemberFilterActionGroup_hide_static_label=Hide &Static Fields and Methods MemberFilterActionGroup_hide_static_tooltip=Hide Static Fields and Methods MemberFilterActionGroup_hide_static_description=Toggles the visibility of static fields and methods MemberFilterActionGroup_hide_nonpublic_label=Hide Non-&Public Members MemberFilterActionGroup_hide_nonpublic_tooltip=Hide Non-Public Members MemberFilterActionGroup_hide_nonpublic_description=Toggles the visibility of non-public members MemberFilterActionGroup_hide_localtypes_label=Hide Local &Types MemberFilterActionGroup_hide_localtypes_tooltip=Hide Local Types MemberFilterActionGroup_hide_localtypes_description=Toggles the visibility of local types NewWizardsActionGroup_new=Ne&w OpenProjectAction_dialog_title=Open Project OpenProjectAction_dialog_message=Select project(s) to be opened OpenProjectAction_error_message=Problems while opening projects OpenJavaPerspectiveAction_dialog_title=Open Java Perspective OpenJavaPerspectiveAction_error_open_failed=Could not open Java perspective OpenJavaBrowsingPerspectiveAction_dialog_title=Open Java Browsing Perspective OpenJavaBrowsingPerspectiveAction_error_open_failed=Could not open Java browsing perspective OpenTypeInHierarchyAction_label=Open Type in Hierarchy... OpenTypeInHierarchyAction_description=Open a type in a type hierarchy OpenTypeInHierarchyAction_tooltip=Open a Type in a Type Hierarchy OpenTypeInHierarchyAction_dialogMessage=&Choose a type (? = any character, * = any string): OpenTypeInHierarchyAction_dialogTitle=Open Type in Hierarchy OpenNewAnnotationWizardAction_tooltip=Opens the new annotation type wizard OpenNewJavaProjectWizardAction_tooltip=Opens the new Java project wizard OpenNewPackageWizardAction_description=Opens the new Java package wizard OpenNewSourceFolderWizardAction_tooltip=Opens the new Java source folder wizard OpenNewClassWizardAction_description=Opens the new class wizard OpenNewInterfaceWizardAction_tooltip=Opens the new interface wizard OpenNewSourceFolderWizardAction_text=Source Folder OpenNewEnumWizardAction_description=Opens the new enum type wizard OpenNewJavaProjectWizardAction_text=Java Project RefreshAction_label= Re&fresh RefreshAction_toolTip= Refresh RefreshAction_progressMessage= Refreshing... RefreshAction_error_title= Refresh Problems RefreshAction_error_message= Problems occurred refreshing the selected resources. RefreshAction_locationDeleted_title= Project location has been deleted RefreshAction_locationDeleted_message= The location for project {0} ({1}) has been deleted.\n Delete {0} from the workspace? ModifyParameterAction_problem_title=Refactoring ModifyParameterAction_problem_message=Cannot perform operation. ActionUtil_notOnBuildPath_title=Cannot Perform Operation ActionUtil_notOnBuildPath_message=The resource is not on the build path of a Java project. ActionUtil_notOnBuildPath_resource_message=The resource ''{0}'' is not on the build path of a Java project. ActionUtil_not_possible=Cannot Perform Operation ActionUtil_no_linked=This operation is unavailable on linked packages and package fragment roots. SelectAllAction_label= Select A&ll SelectAllAction_tooltip= Select All AddToClasspathAction_label=Add to &Build Path AddToClasspathAction_toolTip=Add JAR to the Java Build Path AddToClasspathAction_progressMessage=Adding to build path... AddToClasspathAction_error_title=Add to Build Path AddToClasspathAction_error_message=Problems occurred while adding to the build path. RemoveFromClasspathAction_Remove=Remove from &Build Path RemoveFromClasspathAction_tooltip=Remove Package Fragment Root from the Java Build Path RemoveFromClasspathAction_Removing=Removing from build path... RemoveFromClasspathAction_exception_dialog_title=Remove From Build Path RemoveFromClasspathAction_Problems_occurred=Problems occurred while removing from the build path. AddDelegateMethodsAction_error_title=Generate Delegate Methods AddDelegateMethodsAction_error_actionfailed=Generating delegate methods failed. AddDelegateMethodsAction_label=Generate Delegate &Methods... AddDelegateMethodsAction_description=Adds delegate methods for a type's fields AddDelegateMethodsAction_tooltip=Adds Delegates Methods for a Type's Fields AddDelegateMethodsAction_not_applicable=The operation is not applicable to the current selection. Select a field which is not declared as type variable or a type that declares such fields. AddDelegateMethodsAction_annotation_not_applicable=The Generate Delegate Methods operation is not applicable to annotations. AddDelegateMethodsAction_interface_not_applicable=The Generate Delegate Methods operation is not applicable to interfaces. AddDelegateMethodsAction_duplicate_methods=Duplicate method(s) selected AddDelegateMethodsAction_title=Generate Delegate Methods AddDelegateMethodsAction_message=Select &methods to create delegates for: AddDelegateMethodsAction_selectioninfo_more={0} of {1} selected. AddDelegateMethodsOperation_monitor_message=Adding delegate methods... ToggleLinkingAction_label=Lin&k With Editor ToggleLinkingAction_tooltip=Link with Editor ToggleLinkingAction_description=Link with active editor ConfigureContainerAction_error_title=Configure Classpath Container ConfigureContainerAction_error_creationfailed_message=Configuration of the classpath container failed. ConfigureContainerAction_error_applyingfailed_message=Application of the classpath container changes failed. FindExceptionOccurrences_text= Throwing E&xception FindExceptionOccurrences_toolTip= Find All Occurrences Throwing this Exception FindImplementOccurrencesAction_text= I&mplementing Methods FindImplementOccurrencesAction_toolTip= Find All Methods Implementing or Overriding the Selected Type # The first parameter is the menu text and the second parameter is the shortcut string QuickMenuAction_menuTextWithShortcut= {0}\t{1} --- NEW FILE: SelectionConverter.java --- package org.rubypeople.rdt.internal.ui.actions; import org.eclipse.ui.IEditorInput; import org.rubypeople.rdt.core.IRubyElement; import org.rubypeople.rdt.core.IRubyScript; import org.rubypeople.rdt.internal.ui.RubyPlugin; import org.rubypeople.rdt.internal.ui.rubyeditor.RubyEditor; import org.rubypeople.rdt.ui.IWorkingCopyManager; public class SelectionConverter { public static IRubyScript getInputAsRubyScript(RubyEditor editor) { Object editorInput = SelectionConverter.getInput(editor); if (editorInput instanceof IRubyScript) return (IRubyScript) editorInput; else return null; } public static IRubyElement getInput(RubyEditor editor) { if (editor == null) return null; IEditorInput input= editor.getEditorInput(); IWorkingCopyManager manager= RubyPlugin.getDefault().getWorkingCopyManager(); return manager.getWorkingCopy(input); } } |