|
From: Christopher W. <caw...@us...> - 2006-04-13 23:00:45
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1873/src/org/rubypeople/rdt/internal/ui/preferences Modified Files: TextEditorPreferencePage2.java PreferencesMessages.java TodoTaskConfigurationBlock.java FoldingConfigurationBlock.java PreferencesMessages.properties Added Files: FoldingPreferencePage.java Log Message: move folding preferences to its own page (child of editor pref page), remove old tab for folding on editor pref page, define open editor command, Fix class wizard to handle namespaces in class names, fix class wizard to generate correct filename when class name has a namespace, Extract strings for Folding and syntax coloring preference pages (so they could be translated), Fix output of task tag name for default task tag in task tag preference page list Index: PreferencesMessages.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/PreferencesMessages.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PreferencesMessages.java 12 Apr 2006 21:26:25 -0000 1.5 --- PreferencesMessages.java 13 Apr 2006 23:00:38 -0000 1.6 *************** *** 101,104 **** --- 101,105 ---- public static String RubyEditorPreferencePage_empty_input; public static String RubyEditorPreferencePage_invalid_input; + public static String RubyEditorPreferencePage_folding_title; 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.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PreferencesMessages.properties 12 Apr 2006 21:26:25 -0000 1.8 --- PreferencesMessages.properties 13 Apr 2006 23:00:38 -0000 1.9 *************** *** 84,87 **** --- 84,88 ---- RubyEditorPreferencePage_invalid_input=''{0}'' is not a valid input. RubyEditorPreferencePage_enable= Enab&le + RubyEditorPreferencePage_folding_title= &Folding # coloring Index: TextEditorPreferencePage2.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/TextEditorPreferencePage2.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** TextEditorPreferencePage2.java 12 Apr 2006 21:26:25 -0000 1.24 --- TextEditorPreferencePage2.java 13 Apr 2006 23:00:38 -0000 1.25 *************** *** 18,22 **** import org.eclipse.jface.dialogs.DialogPage; import org.eclipse.jface.dialogs.IMessageProvider; - import org.eclipse.jface.preference.ColorFieldEditor; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ModifyEvent; --- 18,21 ---- *************** *** 27,34 **** import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; - import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; - import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Link; --- 26,31 ---- *************** *** 45,49 **** import org.rubypeople.rdt.internal.ui.RubyUIMessages; import org.rubypeople.rdt.internal.ui.dialogs.StatusInfo; - import org.rubypeople.rdt.internal.ui.text.IRubyColorConstants; import org.rubypeople.rdt.ui.PreferenceConstants; --- 42,45 ---- *************** *** 77,83 **** }; - private org.rubypeople.rdt.internal.ui.preferences.FoldingConfigurationBlock fFoldingConfigurationBlock; - - public TextEditorPreferencePage2() { setDescription(RubyUIMessages.getString("RubyEditorPreferencePage.description")); //$NON-NLS-1$ --- 73,76 ---- *************** *** 167,174 **** * @see PreferencePage#createContents(Composite) */ ! protected Control createContents(Composite parent) { ! ! fFoldingConfigurationBlock= new FoldingConfigurationBlock(fOverlayStore); ! fOverlayStore.load(); fOverlayStore.start(); --- 160,164 ---- * @see PreferencePage#createContents(Composite) */ ! protected Control createContents(Composite parent) { fOverlayStore.load(); fOverlayStore.start(); *************** *** 185,192 **** item.setText(RubyUIMessages.getString("RubyEditorPropertyPage.codeFormatterTabTitle")); item.setControl(createCodeFormatterPage(folder)); - - item= new TabItem(folder, SWT.NONE); - item.setText(RubyUIMessages.getString("RubyEditorPreferencePage.folding.title")); //$NON-NLS-1$ - item.setControl(fFoldingConfigurationBlock.createControl(folder)); initialize(); --- 175,178 ---- *************** *** 196,203 **** private void initialize() { - initializeFields(); - - fFoldingConfigurationBlock.initialize(); } --- 182,186 ---- *************** *** 206,210 **** */ public boolean performOk() { - fFoldingConfigurationBlock.performOk(); fOverlayStore.propagate(); RubyPlugin.getDefault().savePluginPreferences(); --- 189,192 ---- *************** *** 221,226 **** initializeFields(); - fFoldingConfigurationBlock.performDefaults(); - super.performDefaults(); } --- 203,206 ---- *************** *** 229,235 **** * @see DialogPage#dispose() */ ! public void dispose() { ! fFoldingConfigurationBlock.dispose(); ! if (fOverlayStore != null) { fOverlayStore.stop(); --- 209,213 ---- * @see DialogPage#dispose() */ ! public void dispose() { if (fOverlayStore != null) { fOverlayStore.stop(); Index: TodoTaskConfigurationBlock.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/TodoTaskConfigurationBlock.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TodoTaskConfigurationBlock.java 10 Feb 2006 19:52:26 -0000 1.3 --- TodoTaskConfigurationBlock.java 13 Apr 2006 23:00:38 -0000 1.4 *************** *** 16,28 **** import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IStatus; - - import org.eclipse.swt.SWT; - import org.eclipse.swt.graphics.Font; - import org.eclipse.swt.graphics.Image; - 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.jface.resource.JFaceResources; import org.eclipse.jface.viewers.IFontProvider; --- 16,19 ---- *************** *** 32,37 **** import org.eclipse.jface.viewers.ViewerSorter; import org.eclipse.jface.window.Window; ! import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.internal.ui.dialogs.StatusInfo; import org.rubypeople.rdt.internal.ui.wizards.IStatusChangeListener; --- 23,35 ---- import org.eclipse.jface.viewers.ViewerSorter; import org.eclipse.jface.window.Window; ! import org.eclipse.swt.SWT; ! import org.eclipse.swt.graphics.Font; ! import org.eclipse.swt.graphics.Image; ! 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.rubypeople.rdt.core.RubyCore; + import org.rubypeople.rdt.internal.corext.util.Messages; import org.rubypeople.rdt.internal.ui.dialogs.StatusInfo; import org.rubypeople.rdt.internal.ui.wizards.IStatusChangeListener; *************** *** 96,100 **** String name= task.name; if (isDefaultTask(task)) { ! name=PreferencesMessages.TodoTaskConfigurationBlock_tasks_default; } return name; --- 94,98 ---- String name= task.name; if (isDefaultTask(task)) { ! name=Messages.format(PreferencesMessages.TodoTaskConfigurationBlock_tasks_default, name); } return name; Index: FoldingConfigurationBlock.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/FoldingConfigurationBlock.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FoldingConfigurationBlock.java 5 Mar 2005 16:02:19 -0000 1.3 --- FoldingConfigurationBlock.java 13 Apr 2006 23:00:38 -0000 1.4 *************** *** 58,62 **** * @since 3.0 */ ! class FoldingConfigurationBlock { private static class ErrorPreferences implements IRubyFoldingPreferenceBlock { --- 58,62 ---- * @since 3.0 */ ! class FoldingConfigurationBlock implements IPreferenceConfigurationBlock { private static class ErrorPreferences implements IRubyFoldingPreferenceBlock { *************** *** 146,150 **** * @return the control for the preference page */ ! Control createControl(Composite parent) { Composite composite= new Composite(parent, SWT.NULL); --- 146,150 ---- * @return the control for the preference page */ ! public Control createControl(Composite parent) { Composite composite= new Composite(parent, SWT.NULL); *************** *** 312,320 **** } ! void initialize() { restoreFromPreferences(); } ! void performOk() { for (Iterator it= fProviderPreferences.values().iterator(); it.hasNext();) { IRubyFoldingPreferenceBlock prefs= (IRubyFoldingPreferenceBlock) it.next(); --- 312,320 ---- } ! public void initialize() { restoreFromPreferences(); } ! public void performOk() { for (Iterator it= fProviderPreferences.values().iterator(); it.hasNext();) { IRubyFoldingPreferenceBlock prefs= (IRubyFoldingPreferenceBlock) it.next(); *************** *** 323,327 **** } ! void performDefaults() { restoreFromPreferences(); for (Iterator it= fProviderPreferences.values().iterator(); it.hasNext();) { --- 323,327 ---- } ! public void performDefaults() { restoreFromPreferences(); for (Iterator it= fProviderPreferences.values().iterator(); it.hasNext();) { *************** *** 331,335 **** } ! void dispose() { for (Iterator it= fProviderPreferences.values().iterator(); it.hasNext();) { IRubyFoldingPreferenceBlock prefs= (IRubyFoldingPreferenceBlock) it.next(); --- 331,335 ---- } ! public void dispose() { for (Iterator it= fProviderPreferences.values().iterator(); it.hasNext();) { IRubyFoldingPreferenceBlock prefs= (IRubyFoldingPreferenceBlock) it.next(); --- NEW FILE: FoldingPreferencePage.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.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.rubypeople.rdt.internal.ui.RubyPlugin; /** * The page for setting the editor options. */ public final class FoldingPreferencePage extends AbstractConfigurationBlockPreferencePage { /* * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#getHelpId() */ protected String getHelpId() { return null; // TOD) Uncomment when we have IRubyHelpContextIds // return IRubyHelpContextIds.RUBY_EDITOR_PREFERENCE_PAGE; } /* * @see org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription() */ protected void setDescription() { String description= PreferencesMessages.RubyEditorPreferencePage_folding_title; setDescription(description); } /* * @see org.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setPreferenceStore() */ protected void setPreferenceStore() { setPreferenceStore(RubyPlugin.getDefault().getPreferenceStore()); } protected Label createDescriptionLabel(Composite parent) { return null; // no description for new look. } /* * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore) */ protected IPreferenceConfigurationBlock createConfigurationBlock(OverlayPreferenceStore overlayPreferenceStore) { return new FoldingConfigurationBlock(overlayPreferenceStore); } } |