|
From: Matt K. <me...@us...> - 2005-12-20 04:06:07
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18882/src/org/rubypeople/rdt/internal/ui/preferences Modified Files: TextEditorPreferencePage2.java PreferencesMessages.properties Log Message: added link to text editor preference page Index: PreferencesMessages.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/PreferencesMessages.properties,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PreferencesMessages.properties 18 Sep 2005 15:54:36 -0000 1.4 --- PreferencesMessages.properties 20 Dec 2005 04:05:57 -0000 1.5 *************** *** 10,13 **** --- 10,15 ---- ############################################################################### + RubyEditorPreferencePage.link=General text editor preferences can be set on the <a>Text Editors</a> page. + RubyEditorPreferencePage.link.tooltip=Show the shared text editor preferences BuildPathsPropertyPage.error.message=An error occurred while setting the build path BuildPathsPropertyPage.error.title=Error Setting Build Path Index: TextEditorPreferencePage2.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/TextEditorPreferencePage2.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** TextEditorPreferencePage2.java 2 Dec 2005 16:18:11 -0000 1.19 --- TextEditorPreferencePage2.java 20 Dec 2005 04:05:57 -0000 1.20 *************** *** 24,27 **** --- 24,28 ---- import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; + import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; *************** *** 35,39 **** --- 36,42 ---- import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; + import org.eclipse.swt.widgets.Link; import org.eclipse.swt.widgets.List; + import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.TabFolder; import org.eclipse.swt.widgets.TabItem; *************** *** 41,44 **** --- 44,48 ---- import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; + import org.eclipse.ui.dialogs.PreferencesUtil; import org.eclipse.ui.editors.text.ITextEditorHelpContextIds; import org.eclipse.ui.help.WorkbenchHelp; *************** *** 249,252 **** --- 253,267 ---- } }); + + final Shell shell= appearanceComposite.getShell(); + String text= PreferencesMessages.getString("RubyEditorPreferencePage.link"); + Link link= new Link(appearanceComposite, SWT.NONE); + link.setText(text); + link.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + PreferencesUtil.createPreferenceDialogOn(shell, "org.eclipse.ui.preferencePages.GeneralTextEditor", null, null); //$NON-NLS-1$ + } + }); + link.setToolTipText(PreferencesMessages.getString("RubyEditorPreferencePage.link.tooltip")); return appearanceComposite; |