[Pydev-cvs] org.python.pydev/src/org/python/pydev/plugin PydevPlugin.java,1.8,1.9 PydevPrefs.java,1.
Brought to you by:
fabioz
From: Aleksandar T. <at...@us...> - 2004-07-02 02:51:17
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18059/src/org/python/pydev/plugin Modified Files: PydevPlugin.java PydevPrefs.java Log Message: 3.0 port Index: PydevPlugin.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/plugin/PydevPlugin.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PydevPlugin.java 7 May 2004 21:49:00 -0000 1.8 --- PydevPlugin.java 2 Jul 2004 02:50:38 -0000 1.9 *************** *** 8,19 **** import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; - import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; - import org.eclipse.core.runtime.IPluginDescriptor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Preferences; import org.eclipse.core.runtime.Status; ! import org.eclipse.ui.*; import org.eclipse.ui.plugin.AbstractUIPlugin; /** --- 8,25 ---- import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Preferences; import org.eclipse.core.runtime.Status; ! import org.eclipse.ui.IEditorDescriptor; ! import org.eclipse.ui.IEditorInput; ! import org.eclipse.ui.IEditorPart; ! import org.eclipse.ui.IEditorRegistry; ! import org.eclipse.ui.IWorkbenchPage; ! import org.eclipse.ui.PartInitException; ! import org.eclipse.ui.PlatformUI; import org.eclipse.ui.plugin.AbstractUIPlugin; + import org.osgi.framework.BundleContext; + import org.eclipse.ui.ide.IDE; /** *************** *** 32,42 **** * The constructor. */ ! public PydevPlugin(IPluginDescriptor descriptor) { ! super(descriptor); plugin = this; } ! public void startup() throws CoreException { ! super.startup(); try { resourceBundle= ResourceBundle.getBundle("org.python.pydev.PyDevPluginResources"); --- 38,48 ---- * The constructor. */ ! public PydevPlugin() { ! super(); plugin = this; } ! public void start(BundleContext context) throws Exception { ! super.start(context); try { resourceBundle= ResourceBundle.getBundle("org.python.pydev.PyDevPluginResources"); *************** *** 48,55 **** } ! public void shutdown() throws CoreException { Preferences preferences = plugin.getPluginPreferences(); preferences.removePropertyChangeListener(this); ! super.shutdown(); } --- 54,61 ---- } ! public void stop(BundleContext context) throws Exception { Preferences preferences = plugin.getPluginPreferences(); preferences.removePropertyChangeListener(this); ! super.stop(context); } *************** *** 59,63 **** public static String getPluginID() { ! return getDefault().getDescriptor().getUniqueIdentifier(); } --- 65,69 ---- public static String getPluginID() { ! return getDefault().getBundle().getSymbolicName(); } *************** *** 119,123 **** if (file != null && file.exists()) { // File is inside the workspace ! return wp.openEditor(file, null, activate); } else { IStorage storage = new FileStorage(path); --- 125,129 ---- if (file != null && file.exists()) { // File is inside the workspace ! return IDE.openEditor(wp, file, activate); } else { IStorage storage = new FileStorage(path); *************** *** 125,129 **** IEditorDescriptor desc = registry.getDefaultEditor(path.lastSegment()); if (desc == null) ! desc = registry.getDefaultEditor(); IEditorInput input = new ExternalEditorInput(storage); return wp.openEditor(input, desc.getId()); --- 131,135 ---- IEditorDescriptor desc = registry.getDefaultEditor(path.lastSegment()); if (desc == null) ! desc = registry.findEditor(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID); IEditorInput input = new ExternalEditorInput(storage); return wp.openEditor(input, desc.getId()); Index: PydevPrefs.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/plugin/PydevPrefs.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PydevPrefs.java 11 Jun 2004 20:03:56 -0000 1.8 --- PydevPrefs.java 2 Jul 2004 02:50:38 -0000 1.9 *************** *** 51,57 **** public static final String HYPERLINK_COLOR = "HYPERLINK_COLOR"; private static final RGB DEFAULT_HYPERLINK_COLOR = new RGB(0, 0, 238); - // TODO Handle changes to block separator string? - // If user changes this, it needs to update all files with that in it, because the - // undo-er replaces that string, not the first and last lines of a comment block public static final String BLOCK_COMMENT = "BLOCK_COMMENT"; public static final String DEFAULT_BLOCK_COMMENT_STRING = "======================================="; --- 51,54 ---- *************** *** 92,97 **** addField(ife); - StringFieldEditor sfe = new StringFieldEditor ( BLOCK_COMMENT, "Block comment separator", p ); - addField(sfe); addField(new ColorFieldEditor( --- 89,92 ---- *************** *** 103,106 **** --- 98,104 ---- addField(new ColorFieldEditor( COMMENT_COLOR, "Comments", p)); + + StringFieldEditor sfe = new StringFieldEditor ( BLOCK_COMMENT, "Block comment separator", p ); + addField(sfe); } *************** *** 113,117 **** prefs.setDefault(GUESS_TAB_SUBSTITUTION, DEFAULT_GUESS_TAB_SUBSTITUTION); prefs.setDefault(TAB_WIDTH, DEFAULT_TAB_WIDTH); - prefs.setDefault(BLOCK_COMMENT, DEFAULT_BLOCK_COMMENT_STRING); prefs.setDefault(CODE_COLOR,StringConverter.asString(DEFAULT_CODE_COLOR)); prefs.setDefault(KEYWORD_COLOR,StringConverter.asString(DEFAULT_KEYWORD_COLOR)); --- 111,114 ---- *************** *** 119,122 **** --- 116,120 ---- prefs.setDefault(COMMENT_COLOR,StringConverter.asString(DEFAULT_COMMENT_COLOR)); prefs.setDefault(HYPERLINK_COLOR, StringConverter.asString(DEFAULT_HYPERLINK_COLOR)); + prefs.setDefault(BLOCK_COMMENT, DEFAULT_BLOCK_COMMENT_STRING); } } |