From: <kp...@us...> - 2012-02-13 22:06:03
|
Revision: 21126 http://jedit.svn.sourceforge.net/jedit/?rev=21126&view=rev Author: kpouer Date: 2012-02-13 22:05:56 +0000 (Mon, 13 Feb 2012) Log Message: ----------- Removed a cyclic dependency : KeymapMigration is now a service. The MigrationService is moved to org.jedit.core package that should contains core services from jEdit Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/jEdit.java jEdit/trunk/org/gjt/sp/jedit/services.xml jEdit/trunk/org/jedit/migration/KeymapMigration.java Added Paths: ----------- jEdit/trunk/org/jedit/core/ jEdit/trunk/org/jedit/core/MigrationService.java Removed Paths: ------------- jEdit/trunk/org/jedit/migration/MigrationService.java Modified: jEdit/trunk/org/gjt/sp/jedit/jEdit.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/jEdit.java 2012-02-13 17:00:40 UTC (rev 21125) +++ jEdit/trunk/org/gjt/sp/jedit/jEdit.java 2012-02-13 22:05:56 UTC (rev 21126) @@ -25,10 +25,9 @@ import org.gjt.sp.jedit.datatransfer.JEditTransferableService; import org.gjt.sp.jedit.gui.tray.JTrayIconManager; import org.gjt.sp.util.StringList; +import org.jedit.core.MigrationService; import org.jedit.keymap.KeymapManager; import org.jedit.keymap.KeymapManagerImpl; -import org.jedit.migration.KeymapMigration; -import org.jedit.migration.MigrationService; import org.gjt.sp.jedit.visitors.JEditVisitor; import java.awt.*; @@ -436,7 +435,7 @@ if (settingsDirectory != null) { GUIUtilities.advanceSplashProgress("Migrate keymaps"); - MigrationService keymapMigration = new KeymapMigration(); + MigrationService keymapMigration = ServiceManager.getService(MigrationService.class, "keymap"); keymapMigration.migrate(); } Modified: jEdit/trunk/org/gjt/sp/jedit/services.xml =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/services.xml 2012-02-13 17:00:40 UTC (rev 21125) +++ jEdit/trunk/org/gjt/sp/jedit/services.xml 2012-02-13 22:05:56 UTC (rev 21126) @@ -170,4 +170,8 @@ <SERVICE CLASS="org.gjt.sp.jedit.gui.tray.JEditTrayIcon" NAME="swing"> new org.gjt.sp.jedit.gui.tray.JEditSwingTrayIcon(); </SERVICE> + + <SERVICE CLASS="org.jedit.core.MigrationService" NAME="keymap"> + new org.jedit.migration.KeymapMigration(); + </SERVICE> </SERVICES> Added: jEdit/trunk/org/jedit/core/MigrationService.java =================================================================== --- jEdit/trunk/org/jedit/core/MigrationService.java (rev 0) +++ jEdit/trunk/org/jedit/core/MigrationService.java 2012-02-13 22:05:56 UTC (rev 21126) @@ -0,0 +1,33 @@ +/* + * jEdit - Programmer's Text Editor + * :tabSize=8:indentSize=8:noTabs=false: + * :folding=explicit:collapseFolds=1: + * + * Copyright © 2011 Matthieu Casanova + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package org.jedit.core; + +/** + * A Migration service. + * The purpose is to migrate data from an old format to a new one. + * This may happens when upgrading jEdit. + * @author Matthieu Casanova + */ +public interface MigrationService +{ + void migrate(); +} Modified: jEdit/trunk/org/jedit/migration/KeymapMigration.java =================================================================== --- jEdit/trunk/org/jedit/migration/KeymapMigration.java 2012-02-13 17:00:40 UTC (rev 21125) +++ jEdit/trunk/org/jedit/migration/KeymapMigration.java 2012-02-13 22:05:56 UTC (rev 21126) @@ -27,6 +27,7 @@ import java.util.Set; import org.gjt.sp.jedit.jEdit; +import org.jedit.core.MigrationService; import org.jedit.keymap.Keymap; import org.jedit.keymap.KeymapManager; Deleted: jEdit/trunk/org/jedit/migration/MigrationService.java =================================================================== --- jEdit/trunk/org/jedit/migration/MigrationService.java 2012-02-13 17:00:40 UTC (rev 21125) +++ jEdit/trunk/org/jedit/migration/MigrationService.java 2012-02-13 22:05:56 UTC (rev 21126) @@ -1,33 +0,0 @@ -/* - * jEdit - Programmer's Text Editor - * :tabSize=8:indentSize=8:noTabs=false: - * :folding=explicit:collapseFolds=1: - * - * Copyright © 2011 Matthieu Casanova - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or any later version. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package org.jedit.migration; - -/** - * A Migration service. - * The purpose is to migrate data from an old format to a new one. - * This may happens when upgrading jEdit. - * @author Matthieu Casanova - */ -public interface MigrationService -{ - void migrate(); -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |