r398 - in trunk/lutinvcs: . lutinvcs-core/src/main/java/org/codelutin/vcs/ui lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model lutinvcs-ui/src/main/java/org/codelutin/vcs/ui lutinvcs-ui/src/test/java/org/codelutin/vcs/ui
Author: tchemit Date: 2008-04-06 13:05:53 +0000 (Sun, 06 Apr 2008) New Revision: 398 Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/DiffUIHandler.java trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUIFactory.java trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java trunk/lutinvcs/pom.xml Log: new module : ui-pre-jaxx Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java 2008-04-06 13:05:53 UTC (rev 398) @@ -0,0 +1,64 @@ +/** + * # #% Copyright (C) 2008 Code Lutin, Tony Chemit + * 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 (at your option) 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.codelutin.vcs.ui; + +import org.codelutin.vcs.type.VCSAction; +import org.codelutin.vcs.ui.handler.AbstractDiffUIHandler; +import org.codelutin.vcs.ui.handler.AbstractTabUIHandler; +import org.codelutin.vcs.ui.model.AbstractTabUIModel; +import org.codelutin.vcs.ui.model.DiffUIModel; + +import javax.swing.JButton; +import javax.swing.JTable; + +/** @author chemit */ +public abstract class AbstractDiffUI extends AbstractTabUI { + + public abstract JButton getNextDiff(); + + public abstract JButton getPreviousDiff(); + + public AbstractDiffUI() { + super(); + } + + public AbstractDiffUI(AbstractTabUIHandler handler, AbstractTabUIModel model) { + super(handler, model); + } + + public DiffUIModel getModel() { + return (DiffUIModel) model; + } + + protected AbstractDiffUIHandler getHandler() { + return (AbstractDiffUIHandler) handler; + } + + protected void selectFile(JTable table) { + getModel().setFileModel(model.getModel().getDisplayedEntries(table.getSelectionModel()).get(0)); + } + + protected void doAction(VCSAction action) { + getHandler().doAction(action, getModel().getFileModel()); + } + + protected void gotoNextDiff() { + getHandler().gotoNextDiff(); + } + + protected void gotoPreviousDiff() { + getHandler().gotoPreviousDiff(); + } +} Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java 2008-04-06 13:05:53 UTC (rev 398) @@ -0,0 +1,80 @@ +/** + * # #% Copyright (C) 2008 Code Lutin, Tony Chemit + * 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 (at your option) 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.codelutin.vcs.ui; + +import org.codelutin.vcs.type.VCSAction; +import org.codelutin.vcs.type.VCSEntryLocation; +import org.codelutin.vcs.ui.handler.AbstractSynchUIHandler; +import org.codelutin.vcs.ui.model.SynchUIModel; + +import javax.swing.JButton; +import java.awt.CardLayout; + +/** @author chemit */ +public abstract class AbstractSynchUI extends AbstractTabUI { + + public abstract JButton getRefreshAll(); + + public abstract JButton getDiffAll(); + + public abstract JButton getUpdateAll(); + + public abstract JButton getCommitAll(); + + public abstract JButton getRevertAll(); + + public abstract JButton getDeleteAll(); + + public abstract AbstractVCSPopup getAllPopup(); + + public abstract AbstractVCSPopup getLocalPopup(); + + public abstract AbstractVCSPopup getRemotePopup(); + + + public AbstractSynchUI() { + super(); + } + + public AbstractSynchUI(AbstractSynchUIHandler handler, SynchUIModel model) { + super(handler, model); + } + + public SynchUIModel getModel() { + return (SynchUIModel) model; + } + + protected AbstractSynchUIHandler getHandler() { + return (AbstractSynchUIHandler) handler; + } + + protected void doAllAction(VCSAction action) { + getModel().doAllAction(action); + } + + public AbstractVCSPopup getPopup(VCSEntryLocation modelName) { + switch (modelName) { + case ALL: + return getAllPopup(); + case LOCAL: + return getLocalPopup(); + case REMOTE: + return getRemotePopup(); + case UNKNOW: + break; + } + throw new IllegalStateException("no popup found for " + modelName); + } +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java 2008-04-06 13:05:53 UTC (rev 398) @@ -0,0 +1,95 @@ +/** + * # #% Copyright (C) 2008 Code Lutin, Tony Chemit + * 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 (at your option) 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.codelutin.vcs.ui; + +import org.codelutin.vcs.type.VCSEntryLocation; +import org.codelutin.vcs.ui.handler.AbstractTabUIHandler; +import org.codelutin.vcs.ui.model.AbstractTabUIModel; + +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTable; +import javax.swing.JToggleButton; +import java.awt.CardLayout; + +/** @author chemit */ +public abstract class AbstractTabUI extends AbstractUI { + + public abstract JToggleButton getAllTab(); + + public abstract JToggleButton getLocalTab(); + + public abstract JToggleButton getRemoteTab(); + + public abstract JScrollPane getAllContent(); + + public abstract JScrollPane getLocalContent(); + + public abstract JScrollPane getRemoteContent(); + + public abstract JTable getAllTable(); + + public abstract JTable getLocalTable(); + + public abstract JTable getRemoteTable(); + + public abstract JPanel getPreview(); + + public abstract CardLayout getCardLayout(); + + public AbstractTabUI(AbstractTabUIHandler handler, AbstractTabUIModel model) { + super(handler, model); + } + + public AbstractTabUI() { + // for jaxx but never used + super(); + } + + public AbstractTabUIModel getModel() { + return (AbstractTabUIModel) model; + } + + protected AbstractTabUIHandler getHandler() { + return (AbstractTabUIHandler) handler; + } + + @Override + public void setVisible(boolean b) { + if (handler.getLocation() == VCSEntryLocation.UNKNOW) { + // first launch, no tab model selected,choose one + getAllTab().doClick(); + } + super.setVisible(b); + } + + public JTable getTable(VCSEntryLocation modelName) { + switch (modelName) { + case ALL: + return getAllTable(); + case LOCAL: + return getLocalTable(); + case REMOTE: + return getRemoteTable(); + case UNKNOW: + break; + } + throw new IllegalStateException("no table found for " + modelName); + } + + protected void setLocation(VCSEntryLocation location) { + getModel().setLocation(location); + } +} Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java 2008-04-06 13:05:33 UTC (rev 397) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java 2008-04-06 13:05:53 UTC (rev 398) @@ -35,10 +35,6 @@ UIHelper.setQuitAction(this); } - public AbstractUI getUi() { - return this; - } - public AbstractUIModel getModel() { return model; } Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java 2008-04-06 13:05:53 UTC (rev 398) @@ -0,0 +1,48 @@ +/** + * # #% Copyright (C) 2008 Code Lutin, Tony Chemit + * 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 (at your option) 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.codelutin.vcs.ui; + +import org.codelutin.vcs.ui.handler.VCSAbsractAction; +import org.codelutin.vcs.type.VCSAction; + +import javax.swing.JMenuItem; +import java.awt.event.ActionEvent; + +/** @author chemit */ +public abstract class AbstractVCSPopup extends javax.swing.JPopupMenu {/* begin raw body code */ + protected VCSAbsractAction dispatchAction; + + public abstract JMenuItem getRefresh(); + + public abstract JMenuItem getDiff(); + + public abstract JMenuItem getUpdate(); + + public abstract JMenuItem getCommit(); + + public abstract JMenuItem getRevert(); + + public abstract JMenuItem getDelete(); + + protected void setDispatchAction(VCSAbsractAction action) { + this.dispatchAction = action; + } + + protected void doAction(VCSAction action, JMenuItem item) { + dispatchAction.setAction(action); + ActionEvent e = new ActionEvent(item, 1, action.name()); + dispatchAction.actionPerformed(e); + } +} Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 13:05:53 UTC (rev 398) @@ -0,0 +1,44 @@ +/** + * # #% Copyright (C) 2008 Code Lutin, Tony Chemit + * 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 (at your option) 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.codelutin.vcs.ui; + +import jaxx.reflect.ClassDescriptorLoader; +import jaxx.tags.TagManager; +import jaxx.tags.swing.JPopupMenuHandler; +import jaxx.tags.swing.JWindowHandler; + +import java.beans.Introspector; + +public class VCSInitializer implements jaxx.spi.Initializer { + + public void initialize() { + String[] searchPath = Introspector.getBeanInfoSearchPath(); + String[] newSearchPath = new String[searchPath.length + 1]; + System.arraycopy(searchPath, 0, newSearchPath, 0, searchPath.length); + newSearchPath[newSearchPath.length - 1] = "jaxx.beaninfos"; + + Introspector.setBeanInfoSearchPath(newSearchPath); + + TagManager.registerTag("org.codelutin.vcs.ui.*", "JVCSPopup", new DefaultObjectHandler(ClassDescriptorLoader.getClassDescriptor(JPopupMenuHandler.class))); + + TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractSynchUI.class), JWindowHandler.class); + TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractVCSPopup.class), JPopupMenuHandler.class); + + //TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractUI.class), JDialog.class); + + //TagManager.registerDefaultNamespace("AbstractUI", "javax.swing.*"); + + } +} \ No newline at end of file Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java 2008-04-06 13:05:33 UTC (rev 397) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java 2008-04-06 13:05:53 UTC (rev 398) @@ -26,29 +26,15 @@ n_("lutinvcs.status") }; - /** model name for synchronize all tab ui */ + /** model name for synchronize ui */ public static final String SYNCH_MODEL_PROPERTY = "modelSynch"; - public static final String SYNCH_ALL_MODEL_PROPERTY = "modelSynchAll"; - - /** model name for synchronize local tab ui */ - public static final String SYNCH_LOCAL_MODEL_PROPERTY = "modelSynchLocal"; - - /** model name for synchronize remote tab ui */ - public static final String SYNCH_REMOTE_MODEL_PROPERTY = "modelSynchRemote"; - - /** model name for diff all tab ui */ - public static final String DIFF_ALL_MODEL_PROPERTY = "modelDiffAll"; - - /** model name for diff local tab ui */ - public static final String DIFF_LOCAL_MODEL_PROPERTY = "modelDiffLocal"; - - /** model name for diff remote tab ui */ - public static final String DIFF_REMOTE_MODEL_PROPERTY = "modelDiffRemote"; - - /** model name for diff remote tab ui */ + /** model name for confirm ui */ public static final String CONFIRM_MODEL_PROPERTY = "modelConfirm"; + /** model name for diff ui */ + public static final String DIFF_MODEL_PROPERTY = "modelConfirm"; + public static final String ACTION_PROPERTY_CHANGED = "action"; public static final String MESSAGE_HISTORY_PROPERTY_CHANGED = "historyMessage"; Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java 2008-04-06 13:05:33 UTC (rev 397) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java 2008-04-06 13:05:53 UTC (rev 398) @@ -14,8 +14,9 @@ */ package org.codelutin.vcs.ui.handler; +import org.codelutin.vcs.VCSEntry; import org.codelutin.vcs.type.VCSAction; -import org.codelutin.vcs.VCSEntry; +import org.codelutin.vcs.ui.AbstractUI; import org.codelutin.vcs.ui.VCSUIConstants; import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel; import org.codelutin.vcs.ui.model.ConfirmUIModel; @@ -28,7 +29,7 @@ * * @author chemit */ -public abstract class AbstractConfirmUIHandler extends AbstractUIHandler<ConfirmUIModel> { +public abstract class AbstractConfirmUIHandler extends AbstractUIHandler<ConfirmUIModel, AbstractUI> { protected abstract void updateUI(); Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java 2008-04-06 13:05:33 UTC (rev 397) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java 2008-04-06 13:05:53 UTC (rev 398) @@ -14,41 +14,31 @@ */ package org.codelutin.vcs.ui.handler; +import org.codelutin.vcs.VCSEntry; import org.codelutin.vcs.type.VCSAction; -import org.codelutin.vcs.VCSEntry; +import org.codelutin.vcs.type.VCSEntryLocation; +import org.codelutin.vcs.ui.AbstractDiffUI; import org.codelutin.vcs.ui.VCSUIConstants; -import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel; import org.codelutin.vcs.ui.model.DiffUIModel; import java.beans.PropertyChangeEvent; /** @author chemit */ -public abstract class AbstractDiffUIHandler extends AbstractUIHandler<DiffUIModel> { +public abstract class AbstractDiffUIHandler<U extends AbstractDiffUI> extends AbstractTabUIHandler<DiffUIModel, U> { public void propertyChange(PropertyChangeEvent evt) { //if (log.isDebugEnabled()) { log.info(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue()); //} + String action = evt.getPropertyName(); - - if (VCSUIConstants.TAB_PROPERTY_CHANGED.equals(action)) { - doSelectTab((AbstractVCSEntriesTableModel) evt.getNewValue()); + if (VCSUIConstants.FILE_PROPERTY_CHANGED.equals(action)) { + doSelectFile((VCSEntry) evt.getNewValue()); } else { - if (VCSUIConstants.FILE_PROPERTY_CHANGED.equals(action)) { - doSelectFile((VCSEntry) evt.getNewValue()); - } else { - try { - VCSAction vcsAction = VCSAction.valueOf(action.toUpperCase()); - doAction(vcsAction, (VCSEntry) evt.getNewValue()); - } catch (IllegalArgumentException e) { - // ignore ite - } - } + super.propertyChange(evt); } } - public abstract void doSelectTab(AbstractVCSEntriesTableModel action); - public abstract void doSelectFile(VCSEntry model); public abstract void doAction(VCSAction action, VCSEntry model); @@ -57,4 +47,21 @@ public abstract void gotoPreviousDiff(); + public void doSelectLocation(VCSEntryLocation location) { + log.info(location); + + getUi().getCardLayout().show(getUi().getPreview(), location.name().toLowerCase() + "Content"); + //VCSAction[] actions = getModel().getModel().getActions((ListSelectionModel) null); + /*List<String> acts = new ArrayList<String>(); + for (VCSAction action : actions) { + acts.add(action.name().toLowerCase()); + } */ + /*boolean hasActions = actions.length > 0; + getUi().getDiffAll().setEnabled(hasActions && acts.contains("diff")); + getUi().getUpdateAll().setEnabled(hasActions && acts.contains("update")); + getUi().getCommitAll().setEnabled(hasActions && acts.contains("commit")); + getUi().getRevertAll().setEnabled(hasActions && acts.contains("revert")); + getUi().getDeleteAll().setEnabled(hasActions && acts.contains("delete")); + getUi().getRefreshAll().setEnabled(hasActions);*/ + } } \ No newline at end of file Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java 2008-04-06 13:05:33 UTC (rev 397) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java 2008-04-06 13:05:53 UTC (rev 398) @@ -16,37 +16,34 @@ import org.codelutin.vcs.type.VCSAction; import org.codelutin.vcs.type.VCSEntryLocation; -import org.codelutin.vcs.ui.VCSUIConstants; +import org.codelutin.vcs.ui.AbstractSynchUI; import org.codelutin.vcs.ui.model.SynchUIModel; -import java.beans.PropertyChangeEvent; +import javax.swing.ListSelectionModel; +import java.util.ArrayList; +import java.util.List; /** @author chemit */ -public abstract class AbstractSynchUIHandler extends AbstractUIHandler<SynchUIModel> { +public abstract class AbstractSynchUIHandler<U extends AbstractSynchUI> extends AbstractTabUIHandler<SynchUIModel, U> { - public void propertyChange(PropertyChangeEvent evt) { - //if (log.isDebugEnabled()) { - log.info(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue()); - //} - String action = evt.getPropertyName(); + public abstract void doAllAction(VCSAction action); - if (VCSUIConstants.TAB_PROPERTY_CHANGED.equals(action)) { - doSelectLocation((VCSEntryLocation) evt.getNewValue()); - } else if (action.endsWith("All")) { - try { - String actionName = action.substring(0, action.length() - 3); - VCSAction vcsAction = VCSAction.valueOf(actionName.toUpperCase()); - doAllAction(vcsAction); - } catch (IllegalArgumentException e) { - // ignore it ? - } + public void doSelectLocation(VCSEntryLocation location) { + + super.doSelectLocation(location); + + VCSAction[] actions = getModel().getModel().getActions((ListSelectionModel) null); + List<String> acts = new ArrayList<String>(); + for (VCSAction action : actions) { + acts.add(action.name().toLowerCase()); } + boolean hasActions = actions.length > 0; + getUi().getDiffAll().setEnabled(hasActions && acts.contains("diff")); + getUi().getUpdateAll().setEnabled(hasActions && acts.contains("update")); + getUi().getCommitAll().setEnabled(hasActions && acts.contains("commit")); + getUi().getRevertAll().setEnabled(hasActions && acts.contains("revert")); + getUi().getDeleteAll().setEnabled(hasActions && acts.contains("delete")); + getUi().getRefreshAll().setEnabled(hasActions); } - //public abstract void doSelectAction(VCSAction action); - - public abstract void doAllAction(VCSAction action); - - public abstract void doSelectLocation(VCSEntryLocation action); - } Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java (from rev 378, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java) =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java 2008-04-06 13:05:53 UTC (rev 398) @@ -0,0 +1,59 @@ +/** + * # #% Copyright (C) 2008 Code Lutin, Tony Chemit + * 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 (at your option) 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.codelutin.vcs.ui.handler; + +import org.codelutin.vcs.type.VCSEntryLocation; +import org.codelutin.vcs.ui.AbstractTabUI; +import org.codelutin.vcs.ui.VCSUIConstants; +import org.codelutin.vcs.ui.model.AbstractTabUIModel; + +import javax.swing.ListSelectionModel; +import java.beans.PropertyChangeEvent; + +/** @author chemit */ +public abstract class AbstractTabUIHandler<M extends AbstractTabUIModel, U extends AbstractTabUI> extends AbstractUIHandler<M, U> { + + protected abstract void initTab(VCSEntryLocation location); + + @Override + public void init() { + super.init(); + initTab(VCSEntryLocation.ALL); + initTab(VCSEntryLocation.LOCAL); + initTab(VCSEntryLocation.REMOTE); + } + + public ListSelectionModel getSelectionModel() { + return getUi().getTable(getLocation()).getSelectionModel(); + } + + public void propertyChange(PropertyChangeEvent evt) { + //if (log.isDebugEnabled()) { + log.info(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue()); + //} + String action = evt.getPropertyName(); + + if (VCSUIConstants.TAB_PROPERTY_CHANGED.equals(action)) { + doSelectLocation((VCSEntryLocation) evt.getNewValue()); + } + } + + public void doSelectLocation(VCSEntryLocation location) { + log.info(location); + getUi().getCardLayout().show(getUi().getPreview(), location.name().toLowerCase() + "Content"); + + } + +} \ No newline at end of file Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java 2008-04-06 13:05:33 UTC (rev 397) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java 2008-04-06 13:05:53 UTC (rev 398) @@ -18,20 +18,21 @@ import org.apache.commons.logging.LogFactory; import org.codelutin.vcs.VCSFactory; import org.codelutin.vcs.runner.VCSActionManager; +import org.codelutin.vcs.type.VCSEntryLocation; +import org.codelutin.vcs.ui.AbstractUI; import org.codelutin.vcs.ui.model.AbstractUIModel; -import javax.swing.JDialog; import javax.swing.ListSelectionModel; import java.beans.PropertyChangeListener; /** @author chemit */ -public abstract class AbstractUIHandler<M extends AbstractUIModel> implements PropertyChangeListener { +public abstract class AbstractUIHandler<M extends AbstractUIModel, U extends AbstractUI> implements PropertyChangeListener { protected static Log log = LogFactory.getLog(AbstractUIHandler.class); public abstract M getModel(); - public abstract JDialog getUi(); + public abstract U getUi(); public abstract ListSelectionModel getSelectionModel(); @@ -42,6 +43,10 @@ getModel().addPropertyChangeListener(this); } + public VCSEntryLocation getLocation() { + return getModel().getModel().getLocation(); + } + protected VCSActionManager getActionManager() { return VCSFactory.getActionManager(); } Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java (from rev 378, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java) =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java 2008-04-06 13:05:53 UTC (rev 398) @@ -0,0 +1,33 @@ +/** + * # #% Copyright (C) 2008 Code Lutin, Tony Chemit + * 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 (at your option) 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.codelutin.vcs.ui.model; + +import org.codelutin.vcs.type.VCSEntryLocation; +import org.codelutin.vcs.ui.VCSUIConstants; + +/** + * Model of a repository + * + * @author chemit + */ +public class AbstractTabUIModel extends AbstractUIModel { + + public void setLocation(VCSEntryLocation location) { + VCSEntryLocation oldLocation = getModel().getLocation(); + getModel().setLocation(location); + firePropertyChange(VCSUIConstants.TAB_PROPERTY_CHANGED, oldLocation, location); + } + +} \ No newline at end of file Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java 2008-04-06 13:05:33 UTC (rev 397) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java 2008-04-06 13:05:53 UTC (rev 398) @@ -19,7 +19,9 @@ import org.codelutin.vcs.VCSConnexion; import org.codelutin.vcs.VCSEntry; import org.codelutin.vcs.type.VCSEntryLocation; +import org.codelutin.vcs.type.VCSAction; import org.codelutin.vcs.VCSException; +import org.codelutin.vcs.ui.VCSUIConstants; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; @@ -31,6 +33,9 @@ /** to use log facility, just put in your code: log.info(\"...\"); */ static protected final Log log = LogFactory.getLog(AbstractUIModel.class); + /** current action to be fired */ + protected VCSAction action; + /** support for change properties support */ protected PropertyChangeSupport changeSupport; @@ -60,6 +65,16 @@ getModel().refresh(entries, System.nanoTime()); } + public VCSAction getAction() { + return action; + } + + public void setAction(VCSAction action) { + VCSAction oldAction = this.action; + this.action = action; + firePropertyChange(VCSUIConstants.ACTION_PROPERTY_CHANGED, oldAction, action); + } + public synchronized void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) { if (listener == null) { return; Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-06 13:05:33 UTC (rev 397) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-06 13:05:53 UTC (rev 398) @@ -14,10 +14,9 @@ */ package org.codelutin.vcs.ui.model; -import org.codelutin.vcs.type.VCSAction; import org.codelutin.vcs.VCSEntry; +import org.codelutin.vcs.type.VCSAction; import org.codelutin.vcs.type.VCSEntryLocation; -import static org.codelutin.vcs.ui.VCSUIConstants.ACTION_PROPERTY_CHANGED; import static org.codelutin.vcs.ui.VCSUIConstants.MESSAGE_HISTORY_PROPERTY_CHANGED; import java.util.ArrayList; @@ -33,13 +32,7 @@ /** history of commit messages */ protected List<String> commitMessages; - /** current action to fired */ - protected VCSAction action; - public VCSAction getAction() { - return action; - } - public List<String> getCommitMessages() { if (commitMessages == null) { commitMessages = new ArrayList<String>(); @@ -56,10 +49,11 @@ } public void init(VCSAction action, VCSEntryLocation location, VCSEntry[] states) { - this.action = action; + // always reset action in order to allow propagation of action changed + this.action = null; model.clear(); model.populate(location, states); - // never propagate old action, since need always the property changed - firePropertyChange(ACTION_PROPERTY_CHANGED, null, action); + setAction(action); } + } \ No newline at end of file Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-06 13:05:33 UTC (rev 397) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-06 13:05:53 UTC (rev 398) @@ -14,9 +14,7 @@ */ package org.codelutin.vcs.ui.model; -import org.codelutin.vcs.type.VCSAction; import org.codelutin.vcs.VCSEntry; -import org.codelutin.vcs.type.VCSEntryLocation; import org.codelutin.vcs.ui.VCSUIConstants; /** @@ -24,42 +22,18 @@ * * @author chemit */ -public class DiffUIModel extends AbstractUIModel { +public class DiffUIModel extends AbstractTabUIModel { - /** current file displayed */ protected VCSEntry fileModel; - /** current action to fired */ - protected VCSAction action; - - private VCSEntryLocation location; - - public void setLocation(VCSEntryLocation location) { - VCSEntryLocation oldLocation = this.location; - getModel().setLocation(location); - this.location = location; - firePropertyChange(VCSUIConstants.TAB_PROPERTY_CHANGED, oldLocation, location); - } - - public void setFileModel(VCSEntry fileModel) { VCSEntry oldFileModel = this.fileModel; this.fileModel = fileModel; firePropertyChange(VCSUIConstants.TAB_PROPERTY_CHANGED, oldFileModel, fileModel); } - public void doAllAction(VCSAction action) { - this.action = action; - firePropertyChange(action.name().toLowerCase() + "All", null, model); + public VCSEntry getFileModel() { + return fileModel; } - - public void doAction(VCSAction action) { - this.action = action; - firePropertyChange(action.name().toLowerCase(), null, model); - } - - public VCSEntryLocation getLocation() { - return location; - } } \ No newline at end of file Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java 2008-04-06 13:05:33 UTC (rev 397) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java 2008-04-06 13:05:53 UTC (rev 398) @@ -15,27 +15,17 @@ package org.codelutin.vcs.ui.model; import org.codelutin.vcs.type.VCSAction; -import org.codelutin.vcs.type.VCSEntryLocation; -import org.codelutin.vcs.ui.VCSUIConstants; /** * Model of a repository * * @author chemit */ -public class SynchUIModel extends AbstractUIModel { +public class SynchUIModel extends AbstractTabUIModel { - /** current action to be fired */ - protected VCSAction action; - - public void setLocation(VCSEntryLocation location) { - VCSEntryLocation oldLocation = getModel().getLocation(); - getModel().setLocation(location); - firePropertyChange(VCSUIConstants.TAB_PROPERTY_CHANGED, oldLocation, location); - } - public void doAllAction(VCSAction action) { - this.action = action; + + setAction(action); firePropertyChange(action.name().toLowerCase() + "All", null, model); } Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/DiffUIHandler.java =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/DiffUIHandler.java 2008-04-06 13:05:33 UTC (rev 397) +++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/DiffUIHandler.java 2008-04-06 13:05:53 UTC (rev 398) @@ -14,48 +14,46 @@ */ package org.codelutin.vcs.ui; -import org.codelutin.vcs.type.VCSAction; import org.codelutin.vcs.VCSEntry; +import org.codelutin.vcs.type.VCSAction; +import org.codelutin.vcs.type.VCSEntryLocation; import org.codelutin.vcs.ui.handler.AbstractDiffUIHandler; -import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel; import org.codelutin.vcs.ui.model.DiffUIModel; -import javax.swing.ListSelectionModel; - /** @author chemit */ -public class DiffUIHandler extends AbstractDiffUIHandler { +public class DiffUIHandler extends AbstractDiffUIHandler<JDiffUI> { - protected final JDiffUI ui; + protected final AbstractDiffUI ui; public DiffUIHandler() { this.ui = new JDiffUI(this); } public JDiffUI getUi() { - return ui; + return (JDiffUI) ui; } public DiffUIModel getModel() { return ui.getModel(); } - public ListSelectionModel getSelectionModel() { - AbstractVCSEntriesTableModel tabModel = getModel().getModel(); - return tabModel == null ? null : ui.getTable(tabModel.getLocation().name().toLowerCase()).getSelectionModel(); + protected void initTab(VCSEntryLocation location) { + //TODO } - public void doSelectTab(AbstractVCSEntriesTableModel action) { - } - public void doSelectFile(VCSEntry model) { + //TODO } public void doAction(VCSAction action, VCSEntry model) { + //TODO } public void gotoNextDiff() { + //TODO } public void gotoPreviousDiff() { + //TODO } } Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java 2008-04-06 13:05:33 UTC (rev 397) +++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java 2008-04-06 13:05:53 UTC (rev 398) @@ -1,7 +1,7 @@ package org.codelutin.vcs.ui; -import org.codelutin.vcs.type.VCSAction; import org.codelutin.vcs.VCSEntry; +import org.codelutin.vcs.type.VCSAction; import org.codelutin.vcs.type.VCSEntryLocation; import org.codelutin.vcs.ui.handler.AbstractSynchUIHandler; import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel; @@ -15,7 +15,7 @@ import java.util.List; /** @author chemit */ -public class SynchUIHandler extends AbstractSynchUIHandler { +public class SynchUIHandler extends AbstractSynchUIHandler<JSynchUI> { protected final JSynchUI ui; @@ -27,22 +27,10 @@ return ui; } - @Override - public void init() { - super.init(); - initTab(VCSEntryLocation.ALL); - initTab(VCSEntryLocation.LOCAL); - initTab(VCSEntryLocation.REMOTE); - } - public SynchUIModel getModel() { return ui.getModel(); } - public ListSelectionModel getSelectionModel() { - return ui.getTable(getModel().getModel().getLocation().name().toLowerCase()).getSelectionModel(); - } - public void doAllAction(VCSAction action) { AbstractVCSEntriesTableModel model = getModel().getModel(); log.info(action + " : " + model); @@ -73,48 +61,27 @@ } } - - public void doSelectLocation(VCSEntryLocation location) { - log.info(location); - - ui.cardLayout.show(ui.preview, location.name().toLowerCase() + "Content"); - VCSAction[] actions = getModel().getModel().getActions((ListSelectionModel) null); - List<String> acts = new ArrayList<String>(); - for (VCSAction action : actions) { - acts.add(action.name().toLowerCase()); - } - boolean hasActions = actions.length > 0; - ui.getDiffAll().setEnabled(hasActions && acts.contains("diff")); - ui.getUpdateAll().setEnabled(hasActions && acts.contains("update")); - ui.getCommitAll().setEnabled(hasActions && acts.contains("commit")); - ui.getRevertAll().setEnabled(hasActions && acts.contains("revert")); - ui.getDeleteAll().setEnabled(hasActions && acts.contains("delete")); - ui.getRefreshAll().setEnabled(hasActions); - } - - private void initTab(VCSEntryLocation location) { - String s = location.name().toLowerCase(); - JTable table = ui.getTable(s); + protected void initTab(VCSEntryLocation location) { + JTable table = getUi().getTable(location); AbstractVCSEntriesTableModel fileStatesModel = getModel().getModel(); table.setModel(fileStatesModel); - table.addMouseListener(new ListMouseListener(ui, fileStatesModel, s)); - JVCSPopup jvcsPopup = ui.getPopup(s); + table.addMouseListener(new ListMouseListener(ui, fileStatesModel, location)); + AbstractVCSPopup jvcsPopup = getUi().getPopup(location); jvcsPopup.setDispatchAction(new VCSPopupAction(ui, location)); } - private class ListMouseListener extends MouseAdapter { + protected static class ListMouseListener extends MouseAdapter { private final AbstractVCSEntriesTableModel model; private final ListSelectionModel selectionModel; private final JTable jTable; - private final JVCSPopup jPopupMenu; + private final AbstractVCSPopup jPopupMenu; - public ListMouseListener(JSynchUI ui, AbstractVCSEntriesTableModel model, String modelName) { + public ListMouseListener(AbstractSynchUI ui, AbstractVCSEntriesTableModel model, VCSEntryLocation modelName) { this.model = model; jPopupMenu = ui.getPopup(modelName); - jTable = ui.getTable(modelName); selectionModel = jTable.getSelectionModel(); } Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java 2008-04-06 13:05:33 UTC (rev 397) +++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java 2008-04-06 13:05:53 UTC (rev 398) @@ -35,16 +35,16 @@ protected VCSEntryLocation location; protected transient ListSelectionModel selectionModel; - protected transient JSynchUI ui; + protected transient AbstractTabUI ui; protected AbstractVCSEntriesTableModel tableModel; - public VCSPopupAction(JSynchUI ui, VCSEntryLocation location) { + public VCSPopupAction(AbstractTabUI ui, VCSEntryLocation location) { super(); this.ui = ui; this.location = location; //this.selectionModel = ui.getHandler().getSelectionModel(); - this.selectionModel = ui.getTable(location.name().toLowerCase()).getSelectionModel(); + this.selectionModel = ui.getTable(location).getSelectionModel(); tableModel = ui.getModel().getModel(); } Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUIFactory.java =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUIFactory.java 2008-04-06 13:05:33 UTC (rev 397) +++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUIFactory.java 2008-04-06 13:05:53 UTC (rev 398) @@ -28,16 +28,16 @@ protected static Map<Class<? extends AbstractUIHandler>, AbstractUIHandler> cache; - protected static JSynchUI synchUI; - protected static JDiffUI diffUI; + protected static AbstractTabUI synchUI; + protected static AbstractDiffUI diffUI; protected static JConfirmUI confirmUI; - public static JSynchUI newSynchUI() { + public static AbstractSynchUI newSynchUI() { SynchUIHandler result = newHandler(SynchUIHandler.class); return result.getUi(); } - public static JDiffUI newDiffUI() { + public static AbstractDiffUI newDiffUI() { DiffUIHandler result = newHandler(DiffUIHandler.class); return result.getUi(); } Modified: trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java 2008-04-06 13:05:33 UTC (rev 397) +++ trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java 2008-04-06 13:05:53 UTC (rev 398) @@ -44,7 +44,7 @@ try { connexion.open(); - JSynchUI ui = VCSUIFactory.newSynchUI(); + AbstractSynchUI ui = VCSUIFactory.newSynchUI(); fillSynchModel(connexion, ui.getModel(), 20, "trunk", "local/", "remote/"); Modified: trunk/lutinvcs/pom.xml =================================================================== --- trunk/lutinvcs/pom.xml 2008-04-06 13:05:33 UTC (rev 397) +++ trunk/lutinvcs/pom.xml 2008-04-06 13:05:53 UTC (rev 398) @@ -24,6 +24,7 @@ <module>lutinvcs-provider-mock</module> <module>lutinvcs-provider-cvs</module> <module>lutinvcs-provider-svn</module> + <module>lutinvcs-ui-pre-jaxx</module> <module>lutinvcs-ui-jaxx</module> <module>lutinvcs-ui</module> </modules> @@ -215,6 +216,11 @@ </dependency> <dependency> <groupId>lutinlib.vcs</groupId> + <artifactId>lutinvcs-ui-pre-jaxx</artifactId> + <version>${current.version}</version> + </dependency> + <dependency> + <groupId>lutinlib.vcs</groupId> <artifactId>lutinvcs-ui-jaxx</artifactId> <version>${current.version}</version> </dependency>
participants (1)
-
tchemit@users.labs.libre-entreprise.org