|
From: Christopher W. <caw...@us...> - 2006-02-10 20:14:30
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19241/src/org/rubypeople/rdt/internal/ui Modified Files: RubyUIMessages.java RubyUIMessages.properties RubyPluginImages.java RubyPlugin.java Added Files: RubyUIException.java Log Message: --- NEW FILE: RubyUIException.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; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; /** * An exception to wrap a status. This is necessary to use the core's IRunnableWithProgress * support */ public class RubyUIException extends CoreException { private static final long serialVersionUID= 1L; public RubyUIException(IStatus status) { super(status); } } Index: RubyPluginImages.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyPluginImages.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** RubyPluginImages.java 26 Oct 2005 21:55:50 -0000 1.12 --- RubyPluginImages.java 10 Feb 2006 20:14:19 -0000 1.13 *************** *** 4,7 **** --- 4,9 ---- import java.net.URL; + import org.eclipse.core.runtime.IPath; + import org.eclipse.core.runtime.Path; import org.eclipse.jface.action.IAction; import org.eclipse.jface.resource.ImageDescriptor; *************** *** 18,62 **** iconBaseURL= RubyPlugin.getDefault().getBundle().getEntry("/icons/full/"); //$NON-NLS-1$ } private static final ImageRegistry IMAGE_REGISTRY = new ImageRegistry(); private static final String T_OBJ = "obj16"; //$NON-NLS-1$ private static final String T_ELCL= "elcl16"; //$NON-NLS-1$ private static final String T_CTOOL = "ctool16"; //$NON-NLS-1$ private static final String T_WIZBAN= "wizban"; //$NON-NLS-1$ ! public static final String IMG_OBJS_ERROR = NAME_PREFIX + "error_obj.gif"; ! public static final String IMG_OBJS_WARNING = NAME_PREFIX + "warning_obj.gif"; ! public static final String IMG_OBJS_INFO = NAME_PREFIX + "info_obj.gif"; ! public static final String IMG_OBJS_HELP= NAME_PREFIX + "help.gif"; //$NON-NLS-1$ ! public static final String IMG_CTOOLS_RUBY_IMPORT_CONTAINER = NAME_PREFIX + "imp_c.gif"; ! public static final String IMG_CTOOLS_RUBY_IMPORT = NAME_PREFIX + "imp_obj.gif"; ! public static final String IMG_TEMPLATE_PROPOSAL = NAME_PREFIX + "template_obj.gif"; ! public static final String IMG_CTOOLS_RUBY_LOCAL_VAR = NAME_PREFIX + "localvariable_obj.gif"; ! public static final String IMG_CTOOLS_RUBY_PAGE = NAME_PREFIX + "ruby_page.gif"; ! public static final String IMG_CTOOLS_RUBY = NAME_PREFIX + "ruby.gif"; ! public static final String IMG_CTOOLS_RUBY_GLOBAL = NAME_PREFIX + "ruby_global.gif"; ! public static final String IMG_CTOOLS_RUBY_CLASS = NAME_PREFIX + "ruby_class.gif"; ! public static final String IMG_CTOOLS_RUBY_MODULE = NAME_PREFIX + "ruby_module.gif"; ! public static final String IMG_CTOOLS_RUBY_METHOD = NAME_PREFIX + "ruby_method.gif"; ! public static final String IMG_CTOOLS_RUBYMETHOD_PRO = NAME_PREFIX + "ruby_method_pro.gif"; ! public static final String IMG_CTOOLS_RUBYMETHOD_PUB = NAME_PREFIX + "ruby_method_pub.gif"; ! public static final String IMG_CTOOLS_RUBY_SINGLETONMETHOD = NAME_PREFIX + "ruby_singletonmethod.gif"; ! public static final String IMG_CTOOLS_RUBY_SINGLETONMETHOD_PUB = NAME_PREFIX + "ruby_singletonmethod_pub.gif"; ! public static final String IMG_CTOOLS_RUBY_SINGLETONMETHOD_PRO = NAME_PREFIX + "ruby_singletonmethod_pro.gif"; ! public static final String IMG_CTOOLS_RUBY_CLASS_VAR = NAME_PREFIX + "ruby_class_var.gif"; ! public static final String IMG_CTOOLS_RUBY_INSTANCE_VAR = NAME_PREFIX + "ruby_instance_var.gif"; ! public static final String IMG_CTOOLS_RUBY_CONSTANT = NAME_PREFIX + "ruby_constant.gif"; ! public static final String IMG_OBJS_FIXABLE_PROBLEM= NAME_PREFIX + "quickfix_warning_obj.gif"; //$NON-NLS-1$ ! public static final String IMG_OBJS_FIXABLE_ERROR= NAME_PREFIX + "quickfix_error_obj.gif"; //$NON-NLS-1$ ! public static final ImageDescriptor DESC_WIZBAN_NEWJPRJ = create(T_WIZBAN, "newrprj_wiz.gif"); //$NON-NLS-1$ ! public static final ImageDescriptor DESC_WIZBAN_NEWCLASS = create(T_WIZBAN, "newclass_wiz.gif"); //$NON-NLS-1$ // RI ! public static final ImageDescriptor TOOLBAR_REFRESH = create(T_ELCL, "refresh.png");; static { createManaged(T_OBJ, IMG_OBJS_FIXABLE_ERROR); --- 20,133 ---- iconBaseURL= RubyPlugin.getDefault().getBundle().getEntry("/icons/full/"); //$NON-NLS-1$ } + + public static final IPath ICONS_PATH= new Path("$nl$/icons/full"); //$NON-NLS-1$ private static final ImageRegistry IMAGE_REGISTRY = new ImageRegistry(); private static final String T_OBJ = "obj16"; //$NON-NLS-1$ + private static final String T_OVR= "ovr16"; //$NON-NLS-1$ private static final String T_ELCL= "elcl16"; //$NON-NLS-1$ + private static final String T_DLCL= "dlcl16"; //$NON-NLS-1$ private static final String T_CTOOL = "ctool16"; //$NON-NLS-1$ private static final String T_WIZBAN= "wizban"; //$NON-NLS-1$ ! /* ! * Keys for images available from the Ruby-UI plug-in image registry. ! */ ! public static final String IMG_MISC_PUBLIC= NAME_PREFIX + "methpub_obj.gif"; //$NON-NLS-1$ ! public static final String IMG_MISC_PROTECTED= NAME_PREFIX + "methpro_obj.gif"; //$NON-NLS-1$ ! public static final String IMG_MISC_PRIVATE= NAME_PREFIX + "methpri_obj.gif"; //$NON-NLS-1$ ! ! public static final String IMG_OBJS_ERROR = NAME_PREFIX + "error_obj.gif"; ! public static final String IMG_OBJS_WARNING = NAME_PREFIX + "warning_obj.gif"; ! public static final String IMG_OBJS_INFO = NAME_PREFIX + "info_obj.gif"; ! public static final String IMG_OBJS_HELP= NAME_PREFIX + "help.gif"; //$NON-NLS-1$ ! private static final String IMG_OBJS_GHOST= NAME_PREFIX + "ghost.gif"; //$NON-NLS-1$ ! private static final String IMG_OBJS_CLASS= NAME_PREFIX + "class_obj.gif"; //$NON-NLS-1$ ! private static final String IMG_OBJS_INNER_CLASS= NAME_PREFIX + "innerclass_obj.gif"; //$NON-NLS-1$ ! private static final String IMG_OBJS_CLASSALT= NAME_PREFIX + "classfo_obj.gif"; //$NON-NLS-1$ ! private static final String IMG_OBJS_MODULE = NAME_PREFIX + "module_obj.gif"; //$NON-NLS-1$ ! private static final String IMG_OBJS_MODULEALT= NAME_PREFIX + "modulefo_obj.gif"; //$NON-NLS-1$ ! private static final String IMG_OBJS_RUBY_MODEL= NAME_PREFIX + "ruby_model_obj.gif"; //$NON-NLS-1$ ! private static final String IMG_OBJS_SCRIPT= NAME_PREFIX + "rscript_obj.gif"; //$NON-NLS-1$ ! private static final String IMG_OBJS_RUBY_RESOURCE= NAME_PREFIX + "rscript_resource_obj.gif"; //$NON-NLS-1$ ! private static final String IMG_OBJS_UNKNOWN= NAME_PREFIX + "unknown_obj.gif"; //$NON-NLS-1$ ! private static final String IMG_CTOOLS_RUBY_IMPORT_CONTAINER = NAME_PREFIX + "imp_c.gif"; ! private static final String IMG_CTOOLS_RUBY_IMPORT = NAME_PREFIX + "imp_obj.gif"; ! public static final String IMG_TEMPLATE_PROPOSAL = NAME_PREFIX + "template_obj.gif"; ! private static final String IMG_CTOOLS_RUBY_LOCAL_VAR = NAME_PREFIX + "localvariable_obj.gif"; ! public static final String IMG_CTOOLS_RUBY_PAGE = NAME_PREFIX + "ruby_page.gif"; ! public static final String IMG_CTOOLS_RUBY = NAME_PREFIX + "ruby.gif"; ! private static final String IMG_CTOOLS_RUBY_GLOBAL = NAME_PREFIX + "ruby_global.gif"; ! private static final String IMG_CTOOLS_RUBY_CLASS = NAME_PREFIX + "ruby_class.gif"; ! private static final String IMG_CTOOLS_RUBY_METHOD = NAME_PREFIX + "ruby_method.gif"; ! private static final String IMG_CTOOLS_RUBYMETHOD_PRO = NAME_PREFIX + "ruby_method_pro.gif"; ! private static final String IMG_CTOOLS_RUBYMETHOD_PUB = NAME_PREFIX + "ruby_method_pub.gif"; ! private static final String IMG_CTOOLS_RUBY_SINGLETONMETHOD = NAME_PREFIX + "ruby_singletonmethod.gif"; ! private static final String IMG_CTOOLS_RUBY_SINGLETONMETHOD_PUB = NAME_PREFIX + "ruby_singletonmethod_pub.gif"; ! private static final String IMG_CTOOLS_RUBY_SINGLETONMETHOD_PRO = NAME_PREFIX + "ruby_singletonmethod_pro.gif"; ! private static final String IMG_CTOOLS_RUBY_CLASS_VAR = NAME_PREFIX + "ruby_class_var.gif"; ! private static final String IMG_CTOOLS_RUBY_INSTANCE_VAR = NAME_PREFIX + "ruby_instance_var.gif"; ! private static final String IMG_CTOOLS_RUBY_CONSTANT = NAME_PREFIX + "ruby_constant.gif"; ! public static final String IMG_OBJS_FIXABLE_PROBLEM= NAME_PREFIX + "quickfix_warning_obj.gif"; //$NON-NLS-1$ ! private static final String IMG_OBJS_FIXABLE_ERROR= NAME_PREFIX + "quickfix_error_obj.gif"; //$NON-NLS-1$ ! public static final ImageDescriptor DESC_WIZBAN_NEWJPRJ = createUnManaged(T_WIZBAN, "newrprj_wiz.gif"); //$NON-NLS-1$ ! public static final ImageDescriptor DESC_WIZBAN_NEWCLASS = createUnManaged(T_WIZBAN, "newclass_wiz.gif"); //$NON-NLS-1$ // RI ! public static final ImageDescriptor TOOLBAR_REFRESH = createUnManaged(T_ELCL, "refresh.png"); ! ! public static final ImageDescriptor DESC_OBJ_OVERRIDES= createUnManaged(T_OBJ, "over_co.gif"); //$NON-NLS-1$ ! public static final ImageDescriptor DESC_OBJ_IMPLEMENTS= createUnManaged(T_OBJ, "implm_co.gif"); //$NON-NLS-1$ ! ! public static final ImageDescriptor DESC_OVR_STATIC= createUnManaged(T_OVR, "static_co.gif"); //$NON-NLS-1$ ! public static final ImageDescriptor DESC_OVR_FINAL= createUnManaged(T_OVR, "final_co.gif"); //$NON-NLS-1$ ! public static final ImageDescriptor DESC_OVR_ABSTRACT= createUnManaged(T_OVR, "abstract_co.gif"); //$NON-NLS-1$ ! public static final ImageDescriptor DESC_OVR_SYNCH= createUnManaged(T_OVR, "synch_co.gif"); //$NON-NLS-1$ ! public static final ImageDescriptor DESC_OVR_RUN= createUnManaged(T_OVR, "run_co.gif"); //$NON-NLS-1$ ! public static final ImageDescriptor DESC_OVR_WARNING= createUnManaged(T_OVR, "warning_co.gif"); //$NON-NLS-1$ ! public static final ImageDescriptor DESC_OVR_ERROR= createUnManaged(T_OVR, "error_co.gif"); //$NON-NLS-1$ ! public static final ImageDescriptor DESC_OVR_OVERRIDES= createUnManaged(T_OVR, "over_co.gif"); //$NON-NLS-1$ ! public static final ImageDescriptor DESC_OVR_IMPLEMENTS= createUnManaged(T_OVR, "implm_co.gif"); //$NON-NLS-1$ ! public static final ImageDescriptor DESC_OVR_SYNCH_AND_OVERRIDES= createUnManaged(T_OVR, "sync_over.gif"); //$NON-NLS-1$ ! public static final ImageDescriptor DESC_OVR_SYNCH_AND_IMPLEMENTS= createUnManaged(T_OVR, "sync_impl.gif"); //$NON-NLS-1$ ! public static final ImageDescriptor DESC_OVR_CONSTRUCTOR= createUnManaged(T_OVR, "constr_ovr.gif"); //$NON-NLS-1$ ! public static final ImageDescriptor DESC_OVR_DEPRECATED= createUnManaged(T_OVR, "deprecated.gif"); + public static final ImageDescriptor DESC_ELCL_FILTER= createUnManaged(T_ELCL, "filter_ps.gif"); //$NON-NLS-1$ + public static final ImageDescriptor DESC_DLCL_FILTER= createUnManaged(T_DLCL, "filter_ps.gif"); //$NON-NLS-1$ + + public static final ImageDescriptor DESC_OBJS_GHOST= createManaged(T_OBJ, IMG_OBJS_GHOST); + public static final ImageDescriptor DESC_OBJS_IMPDECL= createManaged(T_OBJ, IMG_CTOOLS_RUBY_IMPORT); + public static final ImageDescriptor DESC_OBJS_IMPCONT= createManaged(T_OBJ, IMG_CTOOLS_RUBY_IMPORT_CONTAINER); + + public static final ImageDescriptor DESC_OBJS_RUBY_MODEL= createManaged(T_OBJ, IMG_OBJS_RUBY_MODEL); + + public static final ImageDescriptor DESC_OBJS_LOCAL_VAR = createManaged(T_OBJ, IMG_CTOOLS_RUBY_LOCAL_VAR); + public static final ImageDescriptor DESC_OBJS_GLOBAL = createManaged(T_OBJ, IMG_CTOOLS_RUBY_GLOBAL); + public static final ImageDescriptor DESC_OBJS_MODULE = createManaged(T_OBJ, IMG_OBJS_MODULE); + public static final ImageDescriptor DESC_OBJS_CLASS_VAR = createManaged(T_OBJ, IMG_CTOOLS_RUBY_CLASS_VAR); + public static final ImageDescriptor DESC_OBJS_INSTANCE_VAR = createManaged(T_OBJ, IMG_CTOOLS_RUBY_INSTANCE_VAR); + public static final ImageDescriptor DESC_OBJS_CONSTANT = createManaged(T_OBJ, IMG_CTOOLS_RUBY_CONSTANT); + + public static final ImageDescriptor DESC_OBJS_CLASS= createManaged(T_OBJ, IMG_OBJS_CLASS); + public static final ImageDescriptor DESC_OBJS_CLASSALT= createManaged(T_OBJ, IMG_OBJS_CLASSALT); + public static final ImageDescriptor DESC_OBJS_INNER_CLASS= createManaged(T_OBJ, IMG_OBJS_INNER_CLASS); + public static final ImageDescriptor DESC_OBJS_MODULEALT = createManaged(T_OBJ, IMG_OBJS_MODULEALT); + + + public static final ImageDescriptor DESC_OBJS_SCRIPT= createManaged(T_OBJ, IMG_OBJS_SCRIPT); + public static final ImageDescriptor DESC_OBJS_RUBY_RESOURCE= createManaged(T_OBJ, IMG_OBJS_RUBY_RESOURCE); + + public static final ImageDescriptor DESC_MISC_PUBLIC= createManaged(T_OBJ, IMG_MISC_PUBLIC); + public static final ImageDescriptor DESC_MISC_PROTECTED= createManaged(T_OBJ, IMG_MISC_PROTECTED); + public static final ImageDescriptor DESC_MISC_PRIVATE= createManaged(T_OBJ, IMG_MISC_PRIVATE); + + public static final ImageDescriptor DESC_OBJS_UNKNOWN= createManaged(T_OBJ, IMG_OBJS_UNKNOWN); + + static { createManaged(T_OBJ, IMG_OBJS_FIXABLE_ERROR); *************** *** 72,76 **** createManaged(T_CTOOL, IMG_CTOOLS_RUBY_GLOBAL); createManaged(T_CTOOL, IMG_CTOOLS_RUBY_CLASS); ! createManaged(T_CTOOL, IMG_CTOOLS_RUBY_MODULE); createManaged(T_CTOOL, IMG_CTOOLS_RUBY_METHOD); createManaged(T_CTOOL, IMG_CTOOLS_RUBYMETHOD_PRO); --- 143,147 ---- createManaged(T_CTOOL, IMG_CTOOLS_RUBY_GLOBAL); createManaged(T_CTOOL, IMG_CTOOLS_RUBY_CLASS); ! createManaged(T_CTOOL, IMG_OBJS_MODULE); createManaged(T_CTOOL, IMG_CTOOLS_RUBY_METHOD); createManaged(T_CTOOL, IMG_CTOOLS_RUBYMETHOD_PRO); *************** *** 84,87 **** --- 155,160 ---- createManaged(T_CTOOL, IMG_CTOOLS_RUBY_INSTANCE_VAR); } + + /** * Returns the image managed under the given key in this registry. *************** *** 128,132 **** // ImageDescriptor.createFromURL(makeIconFileURL("c" + type, relPath)); ! action.setImageDescriptor(create("e" + type, relPath)); } --- 201,205 ---- // ImageDescriptor.createFromURL(makeIconFileURL("c" + type, relPath)); ! action.setImageDescriptor(createUnManaged("e" + type, relPath)); } *************** *** 141,145 **** } ! protected static ImageDescriptor create(String prefix, String name) { try { return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name)); --- 214,218 ---- } ! protected static ImageDescriptor createUnManaged(String prefix, String name) { try { return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name)); Index: RubyUIMessages.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyUIMessages.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RubyUIMessages.java 5 Mar 2005 20:48:57 -0000 1.2 --- RubyUIMessages.java 10 Feb 2006 20:14:19 -0000 1.3 *************** *** 5,33 **** import java.util.ResourceBundle; ! public class RubyUIMessages { ! private static final String RESOURCE_BUNDLE= RubyUIMessages.class.getName(); ! private static ResourceBundle resourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE); ! private RubyUIMessages() { ! } ! public static String getString(String key) { ! try { ! return resourceBundle.getString(key); ! } catch (MissingResourceException e) { ! return '!' + key + '!'; ! } ! } ! ! public static String getFormattedString(String key, String arg) { ! return getFormattedString(key, new String[] { arg }); ! } ! ! public static String getFormattedString(String key, String[] args) { ! return MessageFormat.format(getString(key), args); ! } ! ! public static ResourceBundle getResourceBundle() { ! return resourceBundle; ! } } --- 5,53 ---- import java.util.ResourceBundle; ! import org.eclipse.osgi.util.NLS; ! public class RubyUIMessages extends NLS { ! private static final String BUNDLE_NAME = RubyUIMessages.class.getName(); ! private static ResourceBundle resourceBundle = ResourceBundle.getBundle(BUNDLE_NAME); ! ! public static String StatusBarUpdater_num_elements_selected; ! ! public static String RubyElementLabels_default_package; ! public static String RubyElementLabels_anonym_type; ! public static String RubyElementLabels_anonym; ! public static String RubyElementLabels_import_container; ! public static String RubyElementLabels_initializer; ! public static String RubyElementLabels_concat_string; ! public static String RubyElementLabels_comma_string; ! public static String RubyElementLabels_declseparator_string; ! ! public static String RubyImageLabelprovider_assert_wrongImage; ! ! private RubyUIMessages() { ! } ! ! public static String getString(String key) { ! try { ! return resourceBundle.getString(key); ! } catch (MissingResourceException e) { ! return '!' + key + '!'; ! } ! } ! ! public static String getFormattedString(String key, String arg) { ! return getFormattedString(key, new String[] { arg}); ! } ! ! public static String getFormattedString(String key, String[] args) { ! return MessageFormat.format(getString(key), args); ! } ! ! public static ResourceBundle getResourceBundle() { ! return resourceBundle; ! } ! ! static { ! NLS.initializeMessages(BUNDLE_NAME, RubyUIMessages.class); ! } } Index: RubyPlugin.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyPlugin.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** RubyPlugin.java 27 Jan 2006 16:27:56 -0000 1.22 --- RubyPlugin.java 10 Feb 2006 20:14:19 -0000 1.23 *************** *** 19,22 **** --- 19,26 ---- import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; + import org.eclipse.debug.internal.ui.ImageDescriptorRegistry; + import org.eclipse.jface.action.GroupMarker; + import org.eclipse.jface.action.IMenuManager; + import org.eclipse.jface.action.Separator; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.PreferenceConverter; *************** *** 25,28 **** --- 29,33 ---- import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; + import org.eclipse.search.ui.IContextMenuConstants; import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.widgets.Shell; *************** *** 43,47 **** import org.rubypeople.rdt.core.WorkingCopyOwner; import org.rubypeople.rdt.internal.core.util.EclipseJobScheduler; ! import org.rubypeople.rdt.internal.formatter.CodeFormatter; import org.rubypeople.rdt.internal.ui.preferences.MockupPreferenceStore; import org.rubypeople.rdt.internal.ui.rdocexport.RDocUtility; --- 48,53 ---- import org.rubypeople.rdt.core.WorkingCopyOwner; import org.rubypeople.rdt.internal.core.util.EclipseJobScheduler; ! import org.rubypeople.rdt.internal.formatter.OldCodeFormatter; ! import org.rubypeople.rdt.internal.ui.preferences.MembersOrderPreferenceCache; import org.rubypeople.rdt.internal.ui.preferences.MockupPreferenceStore; import org.rubypeople.rdt.internal.ui.rdocexport.RDocUtility; *************** *** 86,89 **** --- 92,97 ---- private RubyFoldingStructureProviderRegistry fFoldingStructureProviderRegistry; private boolean new060ViewsOpened; + private ImageDescriptorRegistry fImageDescriptorRegistry; + private MembersOrderPreferenceCache fMembersOrderPreferenceCache; public RubyPlugin() { *************** *** 132,135 **** --- 140,147 ---- }); + IPreferenceStore store= getPreferenceStore(); + fMembersOrderPreferenceCache= new MembersOrderPreferenceCache(); + fMembersOrderPreferenceCache.install(store); + RubyCore rubyCore = RubyCore.getPlugin(); *************** *** 208,211 **** --- 220,229 ---- textTools = null; } + + if (fMembersOrderPreferenceCache != null) { + fMembersOrderPreferenceCache.dispose(); + fMembersOrderPreferenceCache= null; + } + } finally { super.stop(context); *************** *** 252,267 **** } ! public synchronized RubyTextTools getTextTools() { if (textTools == null) textTools = new RubyTextTools(getPreferenceStore(), RubyCore.getPlugin().getPluginPreferences()); return textTools; } ! public CodeFormatter getCodeFormatter() { ! char indentChar = this.getPreferenceStore().getBoolean(PreferenceConstants.FORMAT_USE_TAB) ? '\t' : ' '; ! String codeFormatterOption = Platform.getDebugOption(RubyCore.PLUGIN_ID + "/codeformatter"); ! boolean isDebug = codeFormatterOption == null ? false : codeFormatterOption.equalsIgnoreCase("true"); ! CodeFormatter codeFormatter = new CodeFormatter(indentChar, isDebug); ! codeFormatter.setIndentation(this.getPreferenceStore().getInt(PreferenceConstants.FORMAT_INDENTATION)); ! return codeFormatter; } --- 270,280 ---- } ! public synchronized RubyTextTools getRubyTextTools() { if (textTools == null) textTools = new RubyTextTools(getPreferenceStore(), RubyCore.getPlugin().getPluginPreferences()); return textTools; } ! public OldCodeFormatter getCodeFormatter() { ! return new OldCodeFormatter(RubyCore.getOptions()); } *************** *** 443,445 **** --- 456,497 ---- } + public static boolean isDebug() { + // TODO set to true based on debugging/tracing! + return false; + } + + /** + * Creates the Java plugin standard groups in a context menu. + * + * @param menu the menu manager to be populated + */ + public static void createStandardGroups(IMenuManager menu) { + if (!menu.isEmpty()) + return; + menu.add(new Separator(IContextMenuConstants.GROUP_NEW)); + menu.add(new GroupMarker(IContextMenuConstants.GROUP_GOTO)); + menu.add(new Separator(IContextMenuConstants.GROUP_OPEN)); + menu.add(new GroupMarker(IContextMenuConstants.GROUP_SHOW)); + menu.add(new Separator(IContextMenuConstants.GROUP_REORGANIZE)); + menu.add(new Separator(IContextMenuConstants.GROUP_GENERATE)); + menu.add(new Separator(IContextMenuConstants.GROUP_SEARCH)); + menu.add(new Separator(IContextMenuConstants.GROUP_BUILD)); + menu.add(new Separator(IContextMenuConstants.GROUP_ADDITIONS)); + menu.add(new Separator(IContextMenuConstants.GROUP_VIEWER_SETUP)); + menu.add(new Separator(IContextMenuConstants.GROUP_PROPERTIES)); + } + + public static ImageDescriptorRegistry getImageDescriptorRegistry() { + return getDefault().internalGetImageDescriptorRegistry(); + } + private synchronized ImageDescriptorRegistry internalGetImageDescriptorRegistry() { + if (fImageDescriptorRegistry == null) + fImageDescriptorRegistry= new ImageDescriptorRegistry(); + return fImageDescriptorRegistry; + } + + public synchronized MembersOrderPreferenceCache getMemberOrderPreferenceCache() { + // initialized on startup + return fMembersOrderPreferenceCache; + } } \ No newline at end of file Index: RubyUIMessages.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyUIMessages.properties,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** RubyUIMessages.properties 27 Jan 2006 16:27:56 -0000 1.12 --- RubyUIMessages.properties 10 Feb 2006 20:14:19 -0000 1.13 *************** *** 143,144 **** --- 143,151 ---- ErrorRunningRdocTitle=Error running RDoc + ToggleComment.label=Togg&le Comment + ToggleComment.tooltip=Toggle Comment For the Selected Lines + ToggleComment.description=Toggle comment for the selected lines + + ToggleComment.error.title=Toggle Comment + ToggleComment.error.message=An error occurred while toggling comments. + |