Jaxx-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
April 2008
- 1 participants
- 373 discussions
[Buix-commits] r443 - trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/META-INF/services
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
11 Apr '08
Author: tchemit
Date: 2008-04-11 02:16:33 +0000 (Fri, 11 Apr 2008)
New Revision: 443
Removed:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/META-INF/services/org.codelutin.vcs.ui.AbstractUI
Log:
old
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/META-INF/services/org.codelutin.vcs.ui.AbstractUI
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/META-INF/services/org.codelutin.vcs.ui.AbstractUI 2008-04-11 01:49:14 UTC (rev 442)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/META-INF/services/org.codelutin.vcs.ui.AbstractUI 2008-04-11 02:16:33 UTC (rev 443)
@@ -1,3 +0,0 @@
-org.codelutin.vcs.ui.JConfirmUI
-org.codelutin.vcs.ui.JSynchUI
-org.codelutin.vcs.ui.JDiffUI
\ No newline at end of file
1
0
[Buix-commits] r442 - trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
11 Apr '08
Author: tchemit
Date: 2008-04-11 01:49:14 +0000 (Fri, 11 Apr 2008)
New Revision: 442
Removed:
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java
Log:
old
Deleted: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java 2008-04-11 01:46:42 UTC (rev 441)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java 2008-04-11 01:49:14 UTC (rev 442)
@@ -1,57 +0,0 @@
-/**
- * # #% 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.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 (AbstractTabUIModel.LOCATION_PROPERTY_CHANGED.equals(action)) {
- doSelectLocation((VCSEntryLocation) evt.getNewValue());
- }
- }
-
- public void doSelectLocation(VCSEntryLocation location) {
- log.info(location);
- getUi().getCardLayout().show(getUi().getPreview(), "tab" + location.name().toLowerCase());
- }
-
-}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java 2008-04-11 01:46:42 UTC (rev 441)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java 2008-04-11 01:49:14 UTC (rev 442)
@@ -1,69 +0,0 @@
-/**
- * # #% 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.apache.commons.logging.Log;
-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.ListSelectionModel;
-import java.beans.PropertyChangeListener;
-
-/** @author chemit */
-public abstract class AbstractUIHandler<M extends AbstractUIModel, U extends AbstractUI> implements PropertyChangeListener {
-
- protected static Log log = LogFactory.getLog(AbstractUIHandler.class);
-
- private U ui;
-
- public abstract Class<? super U> getUiClass();
-
- public abstract Class<? super M> getModelClass();
-
- public abstract ListSelectionModel getSelectionModel();
-
- @SuppressWarnings({"unchecked"})
- public M getModel() {
- return (M) getUi().getModel();
- }
-
- public U getUi() {
- return ui;
- }
-
- public void setUi(U ui) {
- this.ui = ui;
- }
-
-
- public void init() {
- if (getModel() == null) {
- throw new IllegalStateException("no model was defined for " + this);
- }
- getModel().addPropertyChangeListener(this);
- }
-
- public VCSEntryLocation getLocation() {
- return getModel().getEntriesModel().getLocation();
- }
-
- protected VCSActionManager getActionManager() {
- return VCSFactory.getActionManager();
- }
-}
1
0
[Buix-commits] r441 - in trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui: . model
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
11 Apr '08
Author: tchemit
Date: 2008-04-11 01:46:42 +0000 (Fri, 11 Apr 2008)
New Revision: 441
Removed:
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractConfirmUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java
Log:
old
Deleted: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractConfirmUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractConfirmUI.java 2008-04-06 23:12:13 UTC (rev 440)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractConfirmUI.java 2008-04-11 01:46:42 UTC (rev 441)
@@ -1,84 +0,0 @@
-/**
- * # #% 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.runtime.swing.Table;
-import org.codelutin.vcs.ui.model.AbstractUIModel;
-import org.codelutin.vcs.ui.model.ConfirmUIModel;
-import org.codelutin.vcs.ui.handler.ConfirmUIHandler;
-
-import javax.swing.JButton;
-import javax.swing.JLabel;
-import javax.swing.JScrollPane;
-import javax.swing.JTable;
-import javax.swing.JTextArea;
-import javax.swing.JToolBar;
-
-/** @author chemit */
-public abstract class AbstractConfirmUI extends AbstractUI {
-
- public abstract JLabel getActionLabel();
-
- public abstract Table getToolbar();
-
- public abstract JToolBar getTool();
-
- public abstract JLabel getActionCommitLabel();
-
- public abstract JButton getLastMessages();
-
- public abstract JScrollPane getCommitScroll();
-
- public abstract JTextArea getCommitMessage();
-
- public abstract JScrollPane getContent();
-
- public abstract JTable getContentTable();
-
- public abstract JButton getAccept();
-
-
- @Override
- public ConfirmUIHandler getHandler() {
- return (ConfirmUIHandler) super.getHandler();
- }
-
- @Override
- public ConfirmUIModel getModel() {
- return (ConfirmUIModel) super.getModel();
- }
-
- @Override
- public void setModel(AbstractUIModel model) {
- super.setModel(model);
- getContentTable().setModel(model.getEntriesModel());
- }
-
- public void doAccept() {
- getHandler().doAction(getCommitMessage().getText(), getModel().getEntriesModel());
- }
-
- @Override
- public void setVisible(boolean b) {
- if (b) {
- getAccept().setEnabled(getModel().getEntriesModel().getRowCount() > 0);
- }
- super.setVisible(b);
- }
-
- protected void showLastMessages() {
- //TODO
- }
-}
Deleted: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java 2008-04-06 23:12:13 UTC (rev 440)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java 2008-04-11 01:46:42 UTC (rev 441)
@@ -1,87 +0,0 @@
-/**
- * # #% 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.VCSEntry;
-import org.codelutin.vcs.type.VCSAction;
-import org.codelutin.vcs.ui.handler.DiffUIHandler;
-import org.codelutin.vcs.ui.model.DiffUIModel;
-
-import javax.swing.AbstractButton;
-import javax.swing.JButton;
-import java.util.List;
-
-/** @author chemit */
-public abstract class AbstractDiffUI extends AbstractTabUI {
-
- public abstract JButton getNextDiff();
-
- public abstract JButton getPreviousDiff();
-
- public abstract JButton getRefresh();
-
- public abstract JButton getUpdate();
-
- public abstract JButton getCommit();
-
- public abstract JButton getRevert();
-
- public abstract JButton getDelete();
-
- @Override
- public DiffUIModel getModel() {
- return (DiffUIModel) model;
- }
-
- @Override
- protected DiffUIHandler getHandler() {
- return (DiffUIHandler) handler;
- }
-
- public void selectFile() {
- List<VCSEntry> vcsEntryList = model.getEntriesModel().getDisplayedEntries(getHandler().getSelectionModel());
- if (!vcsEntryList.isEmpty()) {
- getModel().setFileModel(vcsEntryList.get(0));
- } else {
- getModel().setFileModel(null);
- }
- }
-
- @Override
- public void setVisible(boolean b) {
- if (b) {
- AbstractButton button = getButton(handler.getLocation());
- if (button == null) {
- button = getAllTab();
- }
- button.doClick();
- if (getTable(getModel().getEntriesModel().getLocation()).getRowCount() > 0)
- getHandler().getSelectionModel().setSelectionInterval(0, 0);
- }
- super.setVisible(b);
- }
-
- protected void doAction(VCSAction action) {
- getHandler().doAction(action, getModel().getFileModel());
- }
-
- protected void gotoNextDiff() {
- getHandler().gotoNextDiff();
- }
-
- protected void gotoPreviousDiff() {
- getHandler().gotoPreviousDiff();
- }
-}
Deleted: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java 2008-04-06 23:12:13 UTC (rev 440)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java 2008-04-11 01:46:42 UTC (rev 441)
@@ -1,87 +0,0 @@
-/**
- * # #% 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.SynchUIHandler;
-import org.codelutin.vcs.ui.model.SynchUIModel;
-
-import javax.swing.JButton;
-import javax.swing.AbstractButton;
-
-/** @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();
-
-
- @Override
- public SynchUIModel getModel() {
- return (SynchUIModel) model;
- }
-
- @Override
- protected SynchUIHandler getHandler() {
- return (SynchUIHandler) handler;
- }
-
- @Override
- public void setVisible(boolean b) {
- if (b) {
- AbstractButton button = getButton(handler.getLocation());
- if (button == null) {
- button = getAllTab();
- }
- button.doClick();
- }
- super.setVisible(b);
- }
-
- 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);
- }
-
-
- protected void doAction(VCSAction action, boolean useSelection) {
- getHandler().doAction(action, useSelection);
- }
-}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java 2008-04-06 23:12:13 UTC (rev 440)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java 2008-04-11 01:46:42 UTC (rev 441)
@@ -1,50 +0,0 @@
-/**
- * # #% 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 javax.swing.AbstractAction;
-import javax.swing.JMenuItem;
-import java.awt.event.ActionEvent;
-
-/** @author chemit */
-public abstract class AbstractVCSPopup extends javax.swing.JPopupMenu {
-
- protected AbstractAction 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();
-
- public void setDispatchAction(javax.swing.AbstractAction 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);
- }
-
-}
Deleted: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java 2008-04-06 23:12:13 UTC (rev 440)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java 2008-04-11 01:46:42 UTC (rev 441)
@@ -1,34 +0,0 @@
-/**
- * # #% 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;
-
-/**
- * Abstract for a dialog with location information (says one tab by location type (except UNKNOW type of course...)
- *
- * @author chemit
- */
-public class AbstractTabUIModel extends AbstractUIModel {
-
- public static final String LOCATION_PROPERTY_CHANGED = "location";
-
- public void setLocation(VCSEntryLocation location) {
- VCSEntryLocation oldLocation = getEntriesModel().getLocation();
- getEntriesModel().setLocation(location);
- firePropertyChange(LOCATION_PROPERTY_CHANGED, oldLocation, location);
- }
-
-}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java 2008-04-06 23:12:13 UTC (rev 440)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java 2008-04-11 01:46:42 UTC (rev 441)
@@ -1,114 +0,0 @@
-/**
- * # #% 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.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.codelutin.vcs.VCSConnexion;
-import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSException;
-import org.codelutin.vcs.type.VCSEntryLocation;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.util.List;
-
-/** @author chemit */
-public abstract class AbstractUIModel {
-
- /** to use log facility, just put in your code: log.info(\"...\"); */
- static protected final Log log = LogFactory.getLog(AbstractUIModel.class);
-
-
- /** support for change properties support */
- protected PropertyChangeSupport changeSupport;
-
- protected final AbstractVCSEntriesTableModel entriesModel;
-
- protected AbstractUIModel() {
- entriesModel = new SimpleVCSEntriesTableModelImpl(getClass().getSimpleName());
- }
-
- public AbstractVCSEntriesTableModel getEntriesModel() {
- return entriesModel;
- }
-
- public void populate(VCSConnexion connexion) throws VCSException {
- getEntriesModel().populate(connexion, System.nanoTime());
- }
-
- public void populate(VCSConnexion connexion, List<String> relativeLocalPaths, VCSEntryLocation location) throws VCSException {
- getEntriesModel().populate(connexion, relativeLocalPaths, location, System.nanoTime());
- }
-
- public void populate(VCSEntryLocation location, VCSEntry[] datas) {
- getEntriesModel().populate(location, datas);
- }
-
- public void refresh(List<VCSEntry> entries) {
- getEntriesModel().refresh(entries, System.nanoTime());
- }
-
- public synchronized void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
- if (listener == null) {
- return;
- }
- if (changeSupport == null) {
- changeSupport = new PropertyChangeSupport(this);
- }
- changeSupport.addPropertyChangeListener(propertyName, listener);
- }
-
- public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
- if (listener == null) {
- return;
- }
- if (changeSupport == null) {
- changeSupport = new PropertyChangeSupport(this);
- }
- changeSupport.addPropertyChangeListener(listener);
- }
-
- public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {
- if (listener == null || changeSupport == null) {
- return;
- }
- changeSupport.removePropertyChangeListener(listener);
- }
-
- public synchronized void removePropertyChangeListeners() {
- if (changeSupport == null) {
- return;
- }
- for (PropertyChangeListener listener : getPropertyChangeListeners()) {
- changeSupport.removePropertyChangeListener(listener);
- }
- }
-
- public synchronized PropertyChangeListener[] getPropertyChangeListeners() {
- if (changeSupport == null) {
- return new PropertyChangeListener[0];
- }
- return changeSupport.getPropertyChangeListeners();
- }
-
- public void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
- if (changeSupport == null || (oldValue == null && newValue == null) ||
- (oldValue != null && oldValue.equals(newValue))) {
- return;
- }
- changeSupport.firePropertyChange(propertyName, oldValue, newValue);
- }
-}
Deleted: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java 2008-04-06 23:12:13 UTC (rev 440)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java 2008-04-11 01:46:42 UTC (rev 441)
@@ -1,187 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
-* Benjamin Poussin, 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 static org.codelutin.i18n.I18n._;
-import org.codelutin.vcs.VCSConnexion;
-import org.codelutin.vcs.VCSEntries;
-import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSException;
-import org.codelutin.vcs.type.VCSAction;
-import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.type.VCSState;
-import org.codelutin.vcs.util.VCSEntriesImpl;
-
-import javax.swing.ListSelectionModel;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Simple Table model to display list of VCSFileState
- *
- * @author chemit
- */
-public abstract class AbstractVCSEntriesTableModel extends javax.swing.table.AbstractTableModel implements VCSEntries {
-
- protected final String name;
-
- /** column names */
- protected final String[] columnNames;
-
- protected VCSEntryLocation location;
-
- /** delegate model */
- protected final transient VCSEntries delegate;
-
- /** displayed entries */
- protected final transient List<VCSEntry> displayedEntries;
-
- private static final long serialVersionUID = 4697917831388337369L;
-
- protected AbstractVCSEntriesTableModel(String name, String[] columnNames) {
- super();
- this.name = name;
- this.columnNames = columnNames;
- this.displayedEntries = new ArrayList<VCSEntry>();
- this.delegate = new VCSEntriesImpl();
- }
-
- public String getName() {
- return name;
- }
-
- public VCSEntryLocation getLocation() {
- return location;
- }
-
- public List<VCSEntry> getDisplayedEntries(ListSelectionModel selectionModel) {
- return selectionModel == null ? new ArrayList<VCSEntry>(displayedEntries) : filter(selectionModel, displayedEntries);
- }
-
- public int getColumnCount() {
- return columnNames.length;
- }
-
- public int getRowCount() {
- return displayedEntries.size();
- }
-
- @Override
- public String getColumnName(int columnIndex) {
- return _(columnNames[columnIndex]);
- }
-
- @Override
- public boolean isCellEditable(int rowIndex, int columnIndex) {
- // read only data
- return false;
- }
-
- @Override
- public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
- // read only data
- }
-
- public void setLocation(VCSEntryLocation location) {
- this.location = location;
- displayedEntries.clear();
- displayedEntries.addAll(filter(location, getEntries()));
- fireTableDataChanged();
- }
-
- public VCSAction[] getActions(ListSelectionModel selectionModel) {
- return getActions(getDisplayedEntries(selectionModel));
- }
-
- @Override
- public String toString() {
- return super.toString() + "<name:" + name + ", size:" + (getRowCount()) + '>';
- }
-
- //===================================================================================================//
- // === delegate methods =============================================================================//
- //===================================================================================================//
-
- public List<VCSEntry> getEntries() {
- return delegate.getEntries();
- }
-
- public List<VCSEntry> filter(VCSAction action, List<VCSEntry> entries) {
- return delegate.filter(action, entries);
- }
-
- public List<VCSEntry> filter(VCSConnexion connexion, List<VCSEntry> entries) {
- return delegate.filter(connexion, entries);
- }
-
- public List<VCSEntry> filter(VCSEntryLocation location, List<VCSEntry> entries) {
- return delegate.filter(location, entries);
- }
-
- public List<VCSEntry> filter(VCSState state, List<VCSEntry> entries) {
- return delegate.filter(state, entries);
- }
-
- public List<VCSEntry> filter(ListSelectionModel selectionModel, List<VCSEntry> entries) {
- return delegate.filter(selectionModel, entries);
- }
-
- public void populate(VCSConnexion connexion, long timestamp) throws VCSException {
- delegate.populate(connexion, timestamp);
- updateEntries();
- }
-
- public void populate(VCSConnexion connexion, List<String> relativeLocalPaths, VCSEntryLocation location, long timestamp) throws VCSException {
- delegate.populate(connexion, relativeLocalPaths, location, timestamp);
- updateEntries();
- }
-
- public void populate(VCSEntryLocation location, VCSEntry[] states) {
- clear();
- this.location = location;
- delegate.populate(location, states);
- updateEntries();
- }
-
- public void refresh(List<VCSEntry> entries, long timestamp) throws IllegalStateException {
- delegate.refresh(entries, timestamp);
- updateEntries();
- }
-
- public VCSAction[] getActions(List<VCSEntry> entries) {
- return delegate.getActions(entries);
- }
-
- public VCSState[] getStates(List<VCSEntry> entries) {
- return delegate.getStates(entries);
- }
-
- public void clear() {
- delegate.clear();
- displayedEntries.clear();
- fireTableDataChanged();
- }
-
- protected void updateEntries() {
- displayedEntries.clear();
- displayedEntries.addAll(filter(location, delegate.getEntries()));
- fireTableDataChanged();
- }
-}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-06 23:12:13 UTC (rev 440)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-11 01:46:42 UTC (rev 441)
@@ -1,70 +0,0 @@
-/**
- * # #% 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.VCSEntry;
-import org.codelutin.vcs.type.VCSAction;
-import org.codelutin.vcs.type.VCSEntryLocation;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Model of a a confirmation of action on entries (single type of action possible)
- *
- * @author chemit
- */
-public class ConfirmUIModel extends AbstractUIModel {
-
- /** history of commit messages */
- protected List<String> commitMessages;
-
- /** current action to be fired */
- protected VCSAction action;
- public static final String ACCEPT_PROPERTY_CHANGED = "action";
- public static final String MESSAGE_HISTORY_PROPERTY_CHANGED = "historyMessage";
-
- public List<String> getCommitMessages() {
- if (commitMessages == null) {
- commitMessages = new ArrayList<String>();
- }
- return commitMessages;
- }
-
- public VCSAction getAction() {
- return action;
- }
-
- public void addCommitMessage(String commitMessage) {
- if (commitMessage != null && !commitMessage.isEmpty() && !getCommitMessages().contains(commitMessage)) {
- // add message in history
- getCommitMessages().add(commitMessage);
- firePropertyChange(MESSAGE_HISTORY_PROPERTY_CHANGED, null, commitMessage);
- }
- }
-
- public void init(VCSAction action, VCSEntryLocation location, VCSEntry[] states) {
- getEntriesModel().clear();
- getEntriesModel().populate(location, states);
- setAction(action);
- }
-
- public void setAction(VCSAction action) {
- this.action = action;
- // null oldValue to ensure propagation of changed
- firePropertyChange(ACCEPT_PROPERTY_CHANGED, null, action);
- }
-
-}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java 2008-04-06 23:12:13 UTC (rev 440)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java 2008-04-11 01:46:42 UTC (rev 441)
@@ -1,156 +0,0 @@
-/**
- * # #% 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.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSHandler;
-import org.codelutin.vcs.type.VCSAction;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.net.URL;
-
-/**
- * Model of a diff panel (remote content vs local content
- *
- * @author chemit
- */
-public class DiffPanelUIModel {
-
- static protected final Log log = LogFactory.getLog(DiffPanelUIModel.class);
-
- /** local root : wroking copy */
- protected URL leftRoot;
-
- /** remote root : remote url */
- protected URL rightRoot;
-
- /** vcs handler to use (lazy instanciation) */
- protected VCSHandler handler;
-
- /** map of models */
- protected VCSEntry model;
-
- /** support for change properties support */
- protected PropertyChangeSupport changeSupport;
-
- /** local content */
- protected String leftContent;
-
- /** remote content */
- protected String rightContent;
-
- /** current action to fired */
- protected VCSAction action;
-
- public DiffPanelUIModel() {
- }
-
- public DiffPanelUIModel(VCSHandler handler, URL leftRoot, URL rightRoot) {
- this.handler = handler;
- this.leftRoot = leftRoot;
- this.rightRoot = rightRoot;
- }
-
- public VCSHandler getHandler() {
- return handler;
- }
-
- public URL getLeftRoot() {
- return leftRoot;
- }
-
- public URL getRightRoot() {
- return rightRoot;
- }
-
- public String getLeftContent() {
- return leftContent;
- }
-
- public String getRightContent() {
- return rightContent;
- }
-
- public void setLeftContent(String leftContent) {
- this.leftContent = leftContent;
- }
-
- public void setLeftRoot(URL leftRoot) {
- this.leftRoot = leftRoot;
- }
-
- public void setRightContent(String rightContent) {
- this.rightContent = rightContent;
- }
-
- public void setRightRoot(URL rightRoot) {
- this.rightRoot = rightRoot;
- }
-
- public synchronized void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
- if (listener == null) {
- return;
- }
- if (changeSupport == null) {
- changeSupport = new PropertyChangeSupport(this);
- }
- changeSupport.addPropertyChangeListener(propertyName, listener);
- }
-
- public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
- if (listener == null) {
- return;
- }
- if (changeSupport == null) {
- changeSupport = new PropertyChangeSupport(this);
- }
- changeSupport.addPropertyChangeListener(listener);
- }
-
- public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {
- if (listener == null || changeSupport == null) {
- return;
- }
- changeSupport.removePropertyChangeListener(listener);
- }
-
- public synchronized void removePropertyChangeListeners() {
- if (changeSupport == null) {
- return;
- }
- for (PropertyChangeListener listener : getPropertyChangeListeners()) {
- changeSupport.removePropertyChangeListener(listener);
- }
- }
-
- public synchronized PropertyChangeListener[] getPropertyChangeListeners() {
- if (changeSupport == null) {
- return new PropertyChangeListener[0];
- }
- return changeSupport.getPropertyChangeListeners();
- }
-
- public void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
- if (changeSupport == null || (oldValue == null && newValue == null) ||
- (oldValue != null && oldValue.equals(newValue))) {
- return;
- }
- changeSupport.firePropertyChange(propertyName, oldValue, newValue);
- }
-
-}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-06 23:12:13 UTC (rev 440)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-11 01:46:42 UTC (rev 441)
@@ -1,48 +0,0 @@
-/**
- * # #% 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.VCSEntry;
-import org.codelutin.vcs.type.VCSEntryLocation;
-
-/**
- * Model of a repository
- *
- * @author chemit
- */
-public class DiffUIModel extends AbstractTabUIModel {
-
- public static final String FILE_PROPERTY_CHANGED = "file";
-
- /** current file displayed */
- protected VCSEntry fileModel;
-
- public void setFileModel(VCSEntry fileModel) {
- VCSEntry oldFileModel = this.fileModel;
- this.fileModel = fileModel;
- firePropertyChange(FILE_PROPERTY_CHANGED, oldFileModel, fileModel);
- }
-
- public VCSEntry getFileModel() {
- return fileModel;
- }
-
- public void init(VCSEntryLocation location, VCSEntry[] states) {
- getEntriesModel().clear();
- getEntriesModel().populate(VCSEntryLocation.ALL, states);
- setFileModel(null);
- setLocation(location);
- }
-}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java 2008-04-06 23:12:13 UTC (rev 440)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java 2008-04-11 01:46:42 UTC (rev 441)
@@ -1,57 +0,0 @@
-/**
- * # #% 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.VCSEntry;
-import org.codelutin.vcs.type.VCSState;
-
-/** @author chemit */
-public class SimpleVCSEntriesTableModelImpl extends AbstractVCSEntriesTableModel {
-
- private static final long serialVersionUID = -6397327068709720165L;
-
- /** columns names for a simple table model with module, file and status */
- public static final String[] SIMPLE_COLUMNS_NAMES = new String[]{
- org.codelutin.i18n.I18n.n_("lutinvcs.module"),
- org.codelutin.i18n.I18n.n_("lutinvcs.file"),
- org.codelutin.i18n.I18n.n_("lutinvcs.status")
- };
-
- public SimpleVCSEntriesTableModelImpl(String name) {
- super(name, SIMPLE_COLUMNS_NAMES);
- }
-
- public Object getValueAt(int rowIndex, int columnIndex) {
- if (getRowCount() == 0) {
- return null;
- }
- VCSEntry item = displayedEntries.get(rowIndex);
- Object result = null;
- if (columnIndex == 0) {
- // get module
- result = item.getRelativeLocalPath();
- } else if (columnIndex == 1) {
- // get file
- result = item.getFile().getName();
- } else if (columnIndex == 2) {
- // get status
- VCSState state = item.getState();
- result = state == null ? null : state.libelle();
- }
- return result;
- }
-
-
-}
Deleted: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java 2008-04-06 23:12:13 UTC (rev 440)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java 2008-04-11 01:46:42 UTC (rev 441)
@@ -1,25 +0,0 @@
-/**
- * # #% 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;
-
-/**
- * Model of a repository
- *
- * @author chemit
- */
-public class SynchUIModel extends AbstractTabUIModel {
-
-
-}
1
0
[Buix-commits] r440 - in trunk/lutinvcs: lutinvcs-all/src/test/java/org/codelutin/vcs/ui lutinvcs-core/src/main/java/org/codelutin/vcs lutinvcs-core/src/main/java/org/codelutin/vcs/event lutinvcs-core/src/main/java/org/codelutin/vcs/util lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 23:12:13 +0000 (Sun, 06 Apr 2008)
New Revision: 440
Added:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/event/VCSEntryStateChangedEvent.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/event/VCSEntryStateChangedEventListener.java
Removed:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffPanelUI.jaxx
Modified:
trunk/lutinvcs/lutinvcs-all/src/test/java/org/codelutin/vcs/ui/UITest.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntry.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntryImpl.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css
Log:
begin of diff ui + add listener to listen about change of state on VCSEntry
Modified: trunk/lutinvcs/lutinvcs-all/src/test/java/org/codelutin/vcs/ui/UITest.java
===================================================================
--- trunk/lutinvcs/lutinvcs-all/src/test/java/org/codelutin/vcs/ui/UITest.java 2008-04-06 21:47:39 UTC (rev 439)
+++ trunk/lutinvcs/lutinvcs-all/src/test/java/org/codelutin/vcs/ui/UITest.java 2008-04-06 23:12:13 UTC (rev 440)
@@ -25,6 +25,8 @@
import org.codelutin.vcs.util.VCSConnexionConfigImpl;
import org.codelutin.vcs.util.VCSEntryImpl;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
@@ -39,20 +41,22 @@
I18n.init();
- VCSConnexion connexion = initVCS(new File(new File("").getAbsolutePath()));
+ final VCSConnexion connexion = initVCS(new File(new File("").getAbsolutePath()));
- try {
- connexion.open();
+ connexion.open();
- AbstractSynchUI ui = VCSUIFactory.newSynchUI();
+ AbstractSynchUI ui = VCSUIFactory.newSynchUI();
- fillSynchModel(connexion, ui.getModel(), 20, "trunk", "local/", "remote/");
+ fillSynchModel(connexion, ui.getModel(), 20, "trunk", "local/", "remote/");
- ui.setVisible(true);
+ ui.setVisible(true);
+ ui.addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosed(WindowEvent e) {
+ connexion.close();
+ }
+ });
- } finally {
- connexion.close();
- }
}
public static VCSConnexion initVCS(File root) {
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntry.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntry.java 2008-04-06 21:47:39 UTC (rev 439)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntry.java 2008-04-06 23:12:13 UTC (rev 440)
@@ -14,6 +14,7 @@
*/
package org.codelutin.vcs;
+import org.codelutin.vcs.event.VCSEntryStateChangedEventListener;
import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.type.VCSState;
@@ -125,4 +126,11 @@
BufferedReader getRemoteContent() throws IllegalStateException;
void setState(VCSState state);
+
+ /** @param l the listener to add */
+ void addVCSEntryStateChangedEventListener(VCSEntryStateChangedEventListener l);
+
+ /** @param l the listener to remove */
+ void removeVCSEntryStateChangedEventListener(VCSEntryStateChangedEventListener l);
+
}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/event/VCSEntryStateChangedEvent.java (from rev 436, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/event/VCSConnexionEvent.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/event/VCSEntryStateChangedEvent.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/event/VCSEntryStateChangedEvent.java 2008-04-06 23:12:13 UTC (rev 440)
@@ -0,0 +1,53 @@
+/**
+ * # #% 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.event;
+
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSState;
+
+import java.util.EventObject;
+
+/**
+ * Events to be used when the state of a {@link org.codelutin.vcs.VCSEntry} has changed.
+ *
+ * @author chemit
+ */
+public class VCSEntryStateChangedEvent extends EventObject {
+
+ private static final long serialVersionUID = 1L;
+
+ protected VCSState state;
+
+ /**
+ * Constructs a prototypical Event.
+ *
+ * @param source The object on which the Event initially occurred.
+ * @param type type of event
+ * @throws IllegalArgumentException if source is null.
+ */
+ public VCSEntryStateChangedEvent(VCSEntry source, VCSState type) {
+ super(source);
+ this.state = type;
+ }
+
+ @Override
+ public VCSEntry getSource() {
+ return (VCSEntry) super.getSource();
+ }
+
+ public VCSState getState() {
+ return state;
+ }
+}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/event/VCSEntryStateChangedEventListener.java (from rev 436, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/event/VCSConnexionEventListener.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/event/VCSEntryStateChangedEventListener.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/event/VCSEntryStateChangedEventListener.java 2008-04-06 23:12:13 UTC (rev 440)
@@ -0,0 +1,62 @@
+/**
+ * # #% 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.event;
+
+import org.codelutin.vcs.type.VCSState;
+
+/**
+ * A listener on state of a {@link org.codelutin.vcs.VCSEntry}.
+ *
+ * @author chemit
+ */
+public interface VCSEntryStateChangedEventListener extends java.util.EventListener {
+
+ /**
+ * call when entry was added on local repository (correspond to {@link VCSState#UNVERSIONNED}
+ *
+ * @param event current event
+ */
+ public void onAdded(VCSEntryStateChangedEvent event);
+
+ /**
+ * call when entry was modified on local repository (correspond to {@link VCSState#MODIFIED}
+ *
+ * @param event current event
+ */
+ public void onModified(VCSEntryStateChangedEvent event);
+
+ /**
+ * call when entry is obsolete on local repository (correspond to
+ * {@link VCSState#OUT_OF_DATE_AND_MODIFIED} or {@link VCSState#OUT_OF_DATE}
+ *
+ * @param event current event
+ */
+ public void onObseleted(VCSEntryStateChangedEvent event);
+
+ /**
+ * call when entry was deleted on local repository (corresponds to {@link VCSState#MISSING}
+ *
+ * @param event current event
+ */
+ public void onDeleted(VCSEntryStateChangedEvent event);
+
+ /**
+ * call when entry was updated, commit, revert,...(corresponds to {@link VCSState#UP_TO_DATE}
+ *
+ * @param event current event
+ */
+ public void onUpdated(VCSEntryStateChangedEvent event);
+
+}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntryImpl.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntryImpl.java 2008-04-06 21:47:39 UTC (rev 439)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntryImpl.java 2008-04-06 23:12:13 UTC (rev 440)
@@ -14,11 +14,14 @@
*/
package org.codelutin.vcs.util;
+import org.codelutin.util.ListenerSet;
import org.codelutin.vcs.VCSConnexion;
import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.VCSException;
+import org.codelutin.vcs.event.VCSEntryStateChangedEvent;
+import org.codelutin.vcs.event.VCSEntryStateChangedEventListener;
import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.type.VCSState;
-import org.codelutin.vcs.VCSException;
import java.io.BufferedReader;
import java.io.File;
@@ -39,6 +42,9 @@
protected long timestamp;
protected String rev;
+
+ protected transient ListenerSet<VCSEntryStateChangedEventListener> listeners = new ListenerSet<VCSEntryStateChangedEventListener>();
+
private static final long serialVersionUID = -6628119456256629555L;
public VCSEntryImpl(VCSConnexion connexion, String relativeLocalPath) {
@@ -50,9 +56,68 @@
public void populate(long timestamp) throws VCSException {
this.timestamp = timestamp;
+ VCSState oldState = this.state;
this.state = connexion.getState(new File(connexion.getWorkingCopy(), relativeLocalPath), null);
+ if (oldState != state) {
+ fireStateChanged(oldState);
+ }
}
+ protected void fireStateChanged(VCSState oldState) {
+ VCSEntryStateChangedEvent event = new VCSEntryStateChangedEvent(this, state);
+ switch (state) {
+ case MISSING:
+ for (VCSEntryStateChangedEventListener listener : listeners) {
+ listener.onDeleted(event);
+ }
+ break;
+ case MODIFIED:
+ for (VCSEntryStateChangedEventListener listener : listeners) {
+ listener.onModified(event);
+ }
+ break;
+ case OUT_OF_DATE:
+ for (VCSEntryStateChangedEventListener listener : listeners) {
+ listener.onObseleted(event);
+ }
+ break;
+ case OUT_OF_DATE_AND_MODIFIED:
+ if (oldState == VCSState.OUT_OF_DATE) {
+ for (VCSEntryStateChangedEventListener listener : listeners) {
+ listener.onModified(event);
+ }
+ } else {
+ for (VCSEntryStateChangedEventListener listener : listeners) {
+ listener.onObseleted(event);
+ }
+ }
+ break;
+ case REMOVED:
+ for (VCSEntryStateChangedEventListener listener : listeners) {
+ listener.onDeleted(event);
+ }
+ break;
+ case UNKNOWN:
+ // ?
+ break;
+ case UNVERSIONNED:
+ for (VCSEntryStateChangedEventListener listener : listeners) {
+ listener.onAdded(event);
+ }
+ break;
+ case UNVERSIONNED_OR_MISSING:
+ for (VCSEntryStateChangedEventListener listener : listeners) {
+ listener.onAdded(event);
+ }
+ break;
+ case UP_TO_DATE:
+ for (VCSEntryStateChangedEventListener listener : listeners) {
+ listener.onUpdated(event);
+ }
+ break;
+ }
+ }
+
public void refresh(long timestamp) throws IllegalStateException, VCSException {
checkPopulated();
populate(timestamp);
@@ -115,9 +180,19 @@
}
public void setState(VCSState state) {
+ //TODO Remove this method, we should not be able to change state
+ //TODO is used by VCSUITest (should prefer to implements popuplatemethod in MockConnexion)
this.state = state;
+
}
+ public void addVCSEntryStateChangedEventListener(VCSEntryStateChangedEventListener l) {
+ listeners.add(l);
+ }
+
+ public void removeVCSEntryStateChangedEventListener(VCSEntryStateChangedEventListener l) {
+ }
+
protected void checkPopulated() throws IllegalStateException {
if (timestamp == -1) {
throw new IllegalStateException(this + " was not populated");
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java 2008-04-06 21:47:39 UTC (rev 439)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java 2008-04-06 23:12:13 UTC (rev 440)
@@ -60,34 +60,16 @@
super(handler, model);
}
+ @Override
public AbstractTabUIModel getModel() {
return (AbstractTabUIModel) model;
}
+ @Override
protected AbstractTabUIHandler getHandler() {
return (AbstractTabUIHandler) handler;
}
- /*@Override
- public void setVisible(boolean b) {
- if (b) {
- switch (handler.getLocation()) {
-
- case LOCAL:
- getLocalTab().doClick();
- break;
- case REMOTE:
- getRemoteTab().doClick();
- break;
- case ALL:
- case UNKNOW:
- getAllTab().doClick();
- break;
- }
- }
- super.setVisible(b);
- }*/
-
public JTable getTable(VCSEntryLocation modelName) {
switch (modelName) {
case ALL:
@@ -111,7 +93,7 @@
case REMOTE:
return getRemoteTab();
case UNKNOW:
- break;
+ return null;
}
throw new IllegalStateException("no popup found for " + modelName);
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java 2008-04-06 21:47:39 UTC (rev 439)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java 2008-04-06 23:12:13 UTC (rev 440)
@@ -18,10 +18,13 @@
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.ui.AbstractDiffUI;
+import org.codelutin.vcs.ui.VCSUIFactory;
+import org.codelutin.vcs.ui.AbstractConfirmUI;
import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
import org.codelutin.vcs.ui.model.DiffUIModel;
import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.beans.PropertyChangeEvent;
@@ -99,8 +102,29 @@
getUi().getRefresh().setEnabled(hasActions);
}
- public void doAction(VCSAction action, VCSEntry model) {
+ public void doAction(VCSAction action, VCSEntry file) {
+ AbstractVCSEntriesTableModel model = getModel().getEntriesModel();
+ List<VCSEntry> entries = new ArrayList<VCSEntry>(1);
+ entries.add(file);
log.info(action + " : " + model);
+ ListSelectionModel selectionModel = getSelectionModel();
+ if (action == VCSAction.REFRESH) {
+ selectionModel.clearSelection();
+ // do refresh of all states
+ log.info("refresh :" + model.getRowCount());
+ model.refresh(entries, System.nanoTime());
+ } else {
+
+ log.info("files to treate :" + entries.size());
+
+ AbstractConfirmUI confirmUI = VCSUIFactory.newConfirmUI();
+
+ confirmUI.getModel().init(action, model.getLocation(), entries.toArray(new VCSEntry[entries.size()]));
+
+ confirmUI.setVisible(true);
+ //TODO SynchModel should listener for modification on ActionManagerQueue thread
+ log.info("TODO refresh states for files...");
+ }
}
public void gotoNextDiff() {
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffPanelUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffPanelUI.jaxx 2008-04-06 21:47:39 UTC (rev 439)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffPanelUI.jaxx 2008-04-06 23:12:13 UTC (rev 440)
@@ -1,15 +0,0 @@
-<!--Table>
- <style source="common.css"/>
- <row fill='both'>
- <cell fill='both' weightx='1'-->
-<JSplitPane id='splitPane2' orientation='horizontal' oneTouchExpandable='true'>
- <JScrollPane id='remoteScroll' styleClass='updateScroll'>
- <JTextArea id="remoteContent"/>
- </JScrollPane>
- <JScrollPane id='localScroll' styleClass='updateScroll'>
- <JTextArea id="localContent"/>
- </JScrollPane>
-</JSplitPane>
- <!--/cell>
- </row>
-</Table-->
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 21:47:39 UTC (rev 439)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 23:12:13 UTC (rev 440)
@@ -65,18 +65,33 @@
</JPanel>
</cell>
</row>
- <row>
- <cell fill='both' weighty='1' weightx='2'>
- <!--JDiffPanelUI id="diffPanel"/-->
- <JSplitPane id='splitPane2' orientation='horizontal' oneTouchExpandable='true'>
- <JScrollPane id='remoteScroll' styleClass='updateScroll'>
- <JTextArea id="remoteEditorContent"/>
+ <row fill='both'>
+ <cell fill='both' weighty='1' weightx='1'>
+ <JSplitPane id='splitPane2' orientation='horizontal' resizeWeight="0.5" dividerLocation="{0.5}">
+ <JScrollPane id='remoteEditorScroll' styleClass='diffScroll'>
+ <JTextArea id="remoteEditorContent" editable='false'/>
</JScrollPane>
- <JScrollPane id='localScroll' styleClass='updateScroll'>
+ <JScrollPane id='localEditorScroll' styleClass='diffScroll'>
<JTextArea id="localEditorContent"/>
</JScrollPane>
</JSplitPane>
+
+ <!--Table fill='both'>
+ <row>
+ <cell fill='both' weighty='1' weightx='1'>
+ <JScrollPane id='remoteScroll' styleClass='diffScroll'>
+ <JTextArea id="remoteEditorContent" editable='false' constructorParams="20,80"/>
+ </JScrollPane>
+ </cell>
+ <cell fill='both' weighty='1' weightx='1'>
+ <JScrollPane id='localScroll' styleClass='diffScroll'>
+ <JTextArea id="localEditorContent" constructorParams="20,80"/>
+ </JScrollPane>
+ </cell>
+ </row>
+ </Table-->
</cell>
+
</row>
</Table>
</AbstractDiffUI>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css 2008-04-06 21:47:39 UTC (rev 439)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css 2008-04-06 23:12:13 UTC (rev 440)
@@ -48,4 +48,9 @@
verticalScrollBarPolicy: 20;
horizontalScrollBarPolicy: 31;
visible: false;
+}
+
+.diffScroll {
+ verticalScrollBarPolicy: 20;
+ horizontalScrollBarPolicy: 31;
}
\ No newline at end of file
1
0
[Buix-commits] r439 - in trunk/lutinvcs: lutinvcs-core/src/main/java/org/codelutin/vcs/util lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 21:47:39 +0000 (Sun, 06 Apr 2008)
New Revision: 439
Modified:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntryImpl.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx
Log:
begin of diff ui
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntryImpl.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntryImpl.java 2008-04-06 19:29:20 UTC (rev 438)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntryImpl.java 2008-04-06 21:47:39 UTC (rev 439)
@@ -124,4 +124,7 @@
}
}
+ public String toString() {
+ return super.toString() + " " + localFile + " : " + state;
+ }
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java 2008-04-06 19:29:20 UTC (rev 438)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java 2008-04-06 21:47:39 UTC (rev 439)
@@ -14,11 +14,14 @@
*/
package org.codelutin.vcs.ui;
+import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.ui.handler.DiffUIHandler;
import org.codelutin.vcs.ui.model.DiffUIModel;
-import org.codelutin.vcs.ui.handler.DiffUIHandler;
+import javax.swing.AbstractButton;
import javax.swing.JButton;
+import java.util.List;
/** @author chemit */
public abstract class AbstractDiffUI extends AbstractTabUI {
@@ -27,6 +30,16 @@
public abstract JButton getPreviousDiff();
+ public abstract JButton getRefresh();
+
+ public abstract JButton getUpdate();
+
+ public abstract JButton getCommit();
+
+ public abstract JButton getRevert();
+
+ public abstract JButton getDelete();
+
@Override
public DiffUIModel getModel() {
return (DiffUIModel) model;
@@ -37,10 +50,29 @@
return (DiffUIHandler) handler;
}
- protected void selectFile() {
- getModel().setFileModel(model.getEntriesModel().getDisplayedEntries(getHandler().getSelectionModel()).get(0));
+ public void selectFile() {
+ List<VCSEntry> vcsEntryList = model.getEntriesModel().getDisplayedEntries(getHandler().getSelectionModel());
+ if (!vcsEntryList.isEmpty()) {
+ getModel().setFileModel(vcsEntryList.get(0));
+ } else {
+ getModel().setFileModel(null);
+ }
}
+ @Override
+ public void setVisible(boolean b) {
+ if (b) {
+ AbstractButton button = getButton(handler.getLocation());
+ if (button == null) {
+ button = getAllTab();
+ }
+ button.doClick();
+ if (getTable(getModel().getEntriesModel().getLocation()).getRowCount() > 0)
+ getHandler().getSelectionModel().setSelectionInterval(0, 0);
+ }
+ super.setVisible(b);
+ }
+
protected void doAction(VCSAction action) {
getHandler().doAction(action, getModel().getFileModel());
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java 2008-04-06 19:29:20 UTC (rev 438)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java 2008-04-06 21:47:39 UTC (rev 439)
@@ -16,10 +16,11 @@
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.handler.SynchUIHandler;
import org.codelutin.vcs.ui.model.SynchUIModel;
-import org.codelutin.vcs.ui.handler.SynchUIHandler;
import javax.swing.JButton;
+import javax.swing.AbstractButton;
/** @author chemit */
public abstract class AbstractSynchUI extends AbstractTabUI {
@@ -53,6 +54,18 @@
return (SynchUIHandler) handler;
}
+ @Override
+ public void setVisible(boolean b) {
+ if (b) {
+ AbstractButton button = getButton(handler.getLocation());
+ if (button == null) {
+ button = getAllTab();
+ }
+ button.doClick();
+ }
+ super.setVisible(b);
+ }
+
public AbstractVCSPopup getPopup(VCSEntryLocation modelName) {
switch (modelName) {
case ALL:
@@ -67,6 +80,7 @@
throw new IllegalStateException("no popup found for " + modelName);
}
+
protected void doAction(VCSAction action, boolean useSelection) {
getHandler().doAction(action, useSelection);
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java 2008-04-06 19:29:20 UTC (rev 438)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java 2008-04-06 21:47:39 UTC (rev 439)
@@ -22,11 +22,14 @@
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JToggleButton;
+import javax.swing.AbstractButton;
import java.awt.CardLayout;
/** @author chemit */
public abstract class AbstractTabUI extends AbstractUI {
+ public abstract jaxx.runtime.swing.JAXXButtonGroup getTabs();
+
public abstract JToggleButton getAllTab();
public abstract JToggleButton getLocalTab();
@@ -65,14 +68,25 @@
return (AbstractTabUIHandler) handler;
}
- @Override
+ /*@Override
public void setVisible(boolean b) {
- if (handler.getLocation() == VCSEntryLocation.UNKNOW) {
- // first launch, no tab model selected,choose one
- getAllTab().doClick();
+ if (b) {
+ switch (handler.getLocation()) {
+
+ case LOCAL:
+ getLocalTab().doClick();
+ break;
+ case REMOTE:
+ getRemoteTab().doClick();
+ break;
+ case ALL:
+ case UNKNOW:
+ getAllTab().doClick();
+ break;
+ }
}
super.setVisible(b);
- }
+ }*/
public JTable getTable(VCSEntryLocation modelName) {
switch (modelName) {
@@ -88,6 +102,20 @@
throw new IllegalStateException("no table found for " + modelName);
}
+ public AbstractButton getButton(VCSEntryLocation modelName) {
+ switch (modelName) {
+ case ALL:
+ return getAllTab();
+ case LOCAL:
+ return getLocalTab();
+ case REMOTE:
+ return getRemoteTab();
+ case UNKNOW:
+ break;
+ }
+ throw new IllegalStateException("no popup found for " + modelName);
+ }
+
protected void setLocation(VCSEntryLocation location) {
getModel().setLocation(location);
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 19:29:20 UTC (rev 438)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 21:47:39 UTC (rev 439)
@@ -33,6 +33,7 @@
TagManager.registerDefaultNamespace("AbstractConfirmUI", "org.codelutin.vcs.ui.*");
TagManager.registerDefaultNamespace("AbstractSynchUI", "org.codelutin.vcs.ui.*");
TagManager.registerDefaultNamespace("AbstractDiffUI", "org.codelutin.vcs.ui.*");
+ TagManager.registerDefaultNamespace("DiffPanelUI", "org.codelutin.vcs.ui.*");
TagManager.registerDefaultNamespace("AbstractVCSPopup", "org.codelutin.vcs.ui.*");
TagManager.registerDefaultNamespace("JVCSPopup", "org.codelutin.vcs.ui.*");
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java 2008-04-06 19:29:20 UTC (rev 438)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java 2008-04-06 21:47:39 UTC (rev 439)
@@ -18,9 +18,15 @@
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.ui.AbstractDiffUI;
+import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
import org.codelutin.vcs.ui.model.DiffUIModel;
+import javax.swing.JTable;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
import java.beans.PropertyChangeEvent;
+import java.util.ArrayList;
+import java.util.List;
/** @author chemit */
public class DiffUIHandler extends org.codelutin.vcs.ui.handler.AbstractTabUIHandler<DiffUIModel, AbstractDiffUI> {
@@ -50,20 +56,51 @@
@Override
public void doSelectLocation(VCSEntryLocation location) {
+
super.doSelectLocation(location);
+ AbstractVCSEntriesTableModel fileStatesModel = getModel().getEntriesModel();
+ if (fileStatesModel.getRowCount() > 0) {
+ getSelectionModel().addSelectionInterval(0, 0);
+ } else {
+ getSelectionModel().clearSelection();
+ }
}
protected void initTab(VCSEntryLocation location) {
- //TODO
+ JTable table = getUi().getTable(location);
+ final AbstractVCSEntriesTableModel fileStatesModel = getModel().getEntriesModel();
+ table.setModel(fileStatesModel);
+ table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
+ public void valueChanged(ListSelectionEvent e) {
+ if (!e.getValueIsAdjusting()) {
+ getUi().selectFile();
+ }
+ }
+ });
}
public void doSelectFile(VCSEntry model) {
- //TODO
+
+ boolean hasActions = false;
+ List<String> acts = new ArrayList<String>();
+
+ if (model != null) {
+ List<VCSAction> actions = model.getState().getActions();
+ for (VCSAction action : actions) {
+ acts.add(action.name().toLowerCase());
+ }
+ hasActions = !actions.isEmpty();
+ }
+ getUi().getUpdate().setEnabled(hasActions && acts.contains("update"));
+ getUi().getCommit().setEnabled(hasActions && acts.contains("commit"));
+ getUi().getRevert().setEnabled(hasActions && acts.contains("revert"));
+ getUi().getDelete().setEnabled(hasActions && acts.contains("delete"));
+ getUi().getRefresh().setEnabled(hasActions);
}
public void doAction(VCSAction action, VCSEntry model) {
- //TODO
+ log.info(action + " : " + model);
}
public void gotoNextDiff() {
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java 2008-04-06 19:29:20 UTC (rev 438)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java 2008-04-06 21:47:39 UTC (rev 439)
@@ -3,16 +3,17 @@
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.AbstractConfirmUI;
+import org.codelutin.vcs.ui.AbstractDiffUI;
+import org.codelutin.vcs.ui.AbstractSynchUI;
+import org.codelutin.vcs.ui.AbstractVCSPopup;
+import org.codelutin.vcs.ui.VCSUIFactory;
import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
import org.codelutin.vcs.ui.model.SynchUIModel;
-import org.codelutin.vcs.ui.AbstractSynchUI;
-import org.codelutin.vcs.ui.AbstractConfirmUI;
-import org.codelutin.vcs.ui.VCSUIFactory;
-import org.codelutin.vcs.ui.AbstractVCSPopup;
+import javax.swing.AbstractAction;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
-import javax.swing.AbstractAction;
import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
@@ -66,6 +67,16 @@
}
if (action == VCSAction.DIFF) {
// show diff ui
+ AbstractDiffUI diffUI = VCSUIFactory.newDiffUI();
+ List<VCSEntry> vcsEntryList;
+ if (useSelection) {
+ vcsEntryList = entries;
+ } else {
+ // take all entries
+ vcsEntryList = model.filter(action, model.getEntries());
+ }
+ diffUI.getModel().init(model.getLocation(), vcsEntryList.toArray(new VCSEntry[vcsEntryList.size()]));
+ diffUI.setVisible(true);
return;
}
log.info("files to treate :" + entries.size());
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-06 19:29:20 UTC (rev 438)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-06 21:47:39 UTC (rev 439)
@@ -15,6 +15,7 @@
package org.codelutin.vcs.ui.model;
import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSEntryLocation;
/**
* Model of a repository
@@ -37,4 +38,11 @@
public VCSEntry getFileModel() {
return fileModel;
}
+
+ public void init(VCSEntryLocation location, VCSEntry[] states) {
+ getEntriesModel().clear();
+ getEntriesModel().populate(VCSEntryLocation.ALL, states);
+ setFileModel(null);
+ setLocation(location);
+ }
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 19:29:20 UTC (rev 438)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 21:47:39 UTC (rev 439)
@@ -1,4 +1,5 @@
-<AbstractDiffUI title='lutinvcs.diff.title' id='diffui' defaultCloseOperation='DISPOSE_ON_CLOSE'>
+<AbstractDiffUI title='lutinvcs.diff.title' modal="true" defaultCloseOperation='DISPOSE_ON_CLOSE'
+ height='600' width='500'>
<style source="common.css"/>
<java.awt.CardLayout id='cardLayout'/>
@@ -6,7 +7,7 @@
<row fill='both'>
<cell fill='both' weightx='1'>
<JToolBar>
- <JToggleButton id='allTab' selected='true' buttonGroup='tabs' mnemonic="A"
+ <JToggleButton id='allTab' selected='false' buttonGroup='tabs' mnemonic="A"
toolTipText="lutinvcs.tabs.diff.tooltip.all"
icon='{createImageIcon("remote_vs_local.png")}'
onActionPerformed='setLocation(org.codelutin.vcs.type.VCSEntryLocation.ALL)'/>
@@ -49,19 +50,33 @@
</cell>
</row>
<row fill='both'>
- <cell fill='both' weighty='1' weightx='2'>
+ <cell fill='both'>
<JPanel id='preview' layout='{cardLayout}'>
- <JScrollPane id='allContent' styleClass='diffScroll' constraints='"taball"'>
- <JTable id="allTable" styleClass='diffTable' onMouseClicked="selectFile()"/>
+ <JScrollPane id='allContent' styleClass='diffScroll' constraints='"taball"' height='100'>
+ <JTable id="allTable" styleClass='diffTable' onMouseClicked="selectFile()" selectionMode="0"/>
</JScrollPane>
- <JScrollPane id='localContent' styleClass='diffScroll' constraints='"tablocal"'>
- <JTable id="localTable" styleClass='diffTable' onMouseClicked="selectFile()"/>
+ <JScrollPane id='localContent' styleClass='diffScroll' constraints='"tablocal"' height='100'>
+ <JTable id="localTable" styleClass='diffTable' onMouseClicked="selectFile()" selectionMode="0"/>
</JScrollPane>
- <JScrollPane id='remoteContent' styleClass='diffScroll' constraints='"tabremote"'>
- <JTable id="remoteTable" styleClass='diffTable' onMouseClicked="selectFile()"/>
+ <JScrollPane id='remoteContent' styleClass='diffScroll' constraints='"tabremote"' height='100'>
+ <JTable id="remoteTable" styleClass='diffTable' onMouseClicked="selectFile()"
+ selectionMode="0"/>
</JScrollPane>
</JPanel>
</cell>
</row>
+ <row>
+ <cell fill='both' weighty='1' weightx='2'>
+ <!--JDiffPanelUI id="diffPanel"/-->
+ <JSplitPane id='splitPane2' orientation='horizontal' oneTouchExpandable='true'>
+ <JScrollPane id='remoteScroll' styleClass='updateScroll'>
+ <JTextArea id="remoteEditorContent"/>
+ </JScrollPane>
+ <JScrollPane id='localScroll' styleClass='updateScroll'>
+ <JTextArea id="localEditorContent"/>
+ </JScrollPane>
+ </JSplitPane>
+ </cell>
+ </row>
</Table>
</AbstractDiffUI>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 19:29:20 UTC (rev 438)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 21:47:39 UTC (rev 439)
@@ -1,4 +1,4 @@
-<AbstractSynchUI title='lutinvcs.synch.title' modal="true" defaultCloseOperation='DISPOSE_ON_CLOSE'>
+<AbstractSynchUI title='lutinvcs.synch.title' defaultCloseOperation='DISPOSE_ON_CLOSE'>
<style source="common.css"/>
<java.awt.CardLayout id='cardLayout'/>
1
0
06 Apr '08
Author: tchemit
Date: 2008-04-06 19:29:20 +0000 (Sun, 06 Apr 2008)
New Revision: 438
Modified:
trunk/lutinvcs/pom.xml
Log:
remove module api, now just the core-module :)
Modified: trunk/lutinvcs/pom.xml
===================================================================
--- trunk/lutinvcs/pom.xml 2008-04-06 19:28:34 UTC (rev 437)
+++ trunk/lutinvcs/pom.xml 2008-04-06 19:29:20 UTC (rev 438)
@@ -19,14 +19,12 @@
<artifactId>lutinvcs</artifactId>
<modules>
- <module>lutinvcs-api</module>
<module>lutinvcs-core</module>
<module>lutinvcs-provider-mock</module>
<module>lutinvcs-provider-cvs</module>
<module>lutinvcs-provider-svn</module>
<module>lutinvcs-ui-common</module>
<module>lutinvcs-ui-jaxx</module>
- <!--module>lutinvcs-ui</module-->
<module>lutinvcs-all</module>
</modules>
1
0
06 Apr '08
Author: tchemit
Date: 2008-04-06 19:28:34 +0000 (Sun, 06 Apr 2008)
New Revision: 437
Removed:
trunk/lutinvcs/lutinvcs-api/
Log:
remove module api, now just the core-module :)
1
0
[Buix-commits] r436 - in trunk/lutinvcs: lutinvcs-core/src/main/resources/i18n lutinvcs-provider-cvs lutinvcs-provider-mock lutinvcs-provider-svn lutinvcs-ui-jaxx
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 19:26:53 +0000 (Sun, 06 Apr 2008)
New Revision: 436
Modified:
trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties
trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties
trunk/lutinvcs/lutinvcs-provider-cvs/pom.xml
trunk/lutinvcs/lutinvcs-provider-mock/pom.xml
trunk/lutinvcs/lutinvcs-provider-svn/pom.xml
trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
Log:
remove module api, now just the core-module :)
Modified: trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties 2008-04-06 19:23:45 UTC (rev 435)
+++ trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties 2008-04-06 19:26:53 UTC (rev 436)
@@ -1,4 +1,3 @@
-lutinvcs.error.thread.action=
lutinvcs.action.add=add
lutinvcs.action.changeLog=changeLog
lutinvcs.action.checkout=checkout
@@ -14,6 +13,7 @@
lutinvcs.error.connexion.noopen=connexion {0} was not opened
lutinvcs.error.provider.init.connexion=could not instanciate connexion {0}, for provider {1}, reason\: {2}
lutinvcs.error.provider.init.handler=could not instanciate handler {0}, for provider {1}, reason\: {2}
+lutinvcs.error.thread.action=
lutinvcs.location.all=All
lutinvcs.location.local=Local
lutinvcs.location.remote=Remote
Modified: trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties 2008-04-06 19:23:45 UTC (rev 435)
+++ trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties 2008-04-06 19:26:53 UTC (rev 436)
@@ -1,4 +1,3 @@
-lutinvcs.error.thread.action=
lutinvcs.action.add=Ajouter
lutinvcs.action.changeLog=journal des changements
lutinvcs.action.checkout=R\u00E9cup\u00E9rer
@@ -14,6 +13,7 @@
lutinvcs.error.connexion.noopen=La connexion {0} n''a pas \u00E9t\u00E9 ouverte
lutinvcs.error.provider.init.connexion=Erreur lors de l''instanciation de la connexion {0}, provider {1}, cause\: {2}
lutinvcs.error.provider.init.handler=Erreur lors de l''instanciation du handler {0}, provider {1}, cause\: {2}
+lutinvcs.error.thread.action=
lutinvcs.location.all=All
lutinvcs.location.local=Local
lutinvcs.location.remote=Remote
@@ -27,4 +27,3 @@
lutinvcs.state.unversionned=non versionn\u00E9
lutinvcs.state.unversionnedOrMissing=non versionn\u00E9 ou non pr\u00E9sent localement
lutinvcs.state.uptodate=fichier \u00E0 jour
-
Modified: trunk/lutinvcs/lutinvcs-provider-cvs/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-cvs/pom.xml 2008-04-06 19:23:45 UTC (rev 435)
+++ trunk/lutinvcs/lutinvcs-provider-cvs/pom.xml 2008-04-06 19:26:53 UTC (rev 436)
@@ -39,7 +39,7 @@
<dependencies>
<dependency>
<groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs-api</artifactId>
+ <artifactId>lutinvcs-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
Modified: trunk/lutinvcs/lutinvcs-provider-mock/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-mock/pom.xml 2008-04-06 19:23:45 UTC (rev 435)
+++ trunk/lutinvcs/lutinvcs-provider-mock/pom.xml 2008-04-06 19:26:53 UTC (rev 436)
@@ -39,7 +39,7 @@
<dependencies>
<dependency>
<groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs-api</artifactId>
+ <artifactId>lutinvcs-core</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
Modified: trunk/lutinvcs/lutinvcs-provider-svn/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-svn/pom.xml 2008-04-06 19:23:45 UTC (rev 435)
+++ trunk/lutinvcs/lutinvcs-provider-svn/pom.xml 2008-04-06 19:26:53 UTC (rev 436)
@@ -39,7 +39,7 @@
<dependencies>
<dependency>
<groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs-api</artifactId>
+ <artifactId>lutinvcs-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-06 19:23:45 UTC (rev 435)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-06 19:26:53 UTC (rev 436)
@@ -83,18 +83,8 @@
</build>
<dependencies>
- <!--dependency>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs-core</artifactId>
- <scope>compile</scope>
- </dependency-->
<dependency>
<groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs-provider-mock</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>lutinlib.vcs</groupId>
<artifactId>lutinvcs-ui-common</artifactId>
<scope>compile</scope>
</dependency>
1
0
[Buix-commits] r435 - in trunk/lutinvcs: lutinvcs-api/src/main/java/org/codelutin/vcs lutinvcs-core/src/main/java/org/codelutin/vcs lutinvcs-core/src/main/resources/i18n
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 19:23:45 +0000 (Sun, 06 Apr 2008)
New Revision: 435
Removed:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/package.html
Modified:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/package.html
trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties
trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties
Log:
remove module api, now just the core-module :)
Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/package.html
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/package.html 2008-04-06 19:17:37 UTC (rev 434)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/package.html 2008-04-06 19:23:45 UTC (rev 435)
@@ -1,11 +0,0 @@
-<html>
-<body>
-<h1>Lutin vcs api</h1>
-Ensemble de l'api de base pour g�rer des Versionning Concurrent System (aka
-<code>vcs</code>) tel que CVS ou SVN.
-<br/>
-On retrouve dans ce paquetage, uniquement des d�finitions de types.
-<br/>
-Auncune impl�mentation n'est fournie dans ce paquetage.
-</body>
-</html>
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/package.html
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/package.html 2008-04-06 19:17:37 UTC (rev 434)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/package.html 2008-04-06 19:23:45 UTC (rev 435)
@@ -1,11 +1,13 @@
<html>
<body>
-<h1>Lutin vcs</h1>
+<h1>Lutin vcs core</h1>
Ensemble de l'api de base pour g�rer des Versionning Concurrent System (aka
<code>vcs</code>) tel que CVS ou SVN.
<br/>
-On retrouve ici des interfaces, des classes g�n�riques et les objets li�s aux vcs.
+On retrouve dans ce paquetage, uniquement des d�finitions de types.
<br/>
-Auncune impl�mentation n'est fournit actuellement ici.
+Auncune impl�mentation de provider n'est fournie dans ce paquetage.
+<br/>
+La classe <code>VCSFactory</code> permet d'obtenir les connexions. TOOD Finir la doc.
</body>
</html>
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties 2008-04-06 19:17:37 UTC (rev 434)
+++ trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties 2008-04-06 19:23:45 UTC (rev 435)
@@ -1 +1,29 @@
lutinvcs.error.thread.action=
+lutinvcs.action.add=add
+lutinvcs.action.changeLog=changeLog
+lutinvcs.action.checkout=checkout
+lutinvcs.action.commit=commit
+lutinvcs.action.delete=delete
+lutinvcs.action.diff=diff
+lutinvcs.action.overwriteAndUpdate=overwrite and update
+lutinvcs.action.refresh=
+lutinvcs.action.revert=revert
+lutinvcs.action.update=update
+lutinvcs.error.checkout.dir=Can''t checkout dir {0}
+lutinvcs.error.connexion.noinit=connexion {0} was not init
+lutinvcs.error.connexion.noopen=connexion {0} was not opened
+lutinvcs.error.provider.init.connexion=could not instanciate connexion {0}, for provider {1}, reason\: {2}
+lutinvcs.error.provider.init.handler=could not instanciate handler {0}, for provider {1}, reason\: {2}
+lutinvcs.location.all=All
+lutinvcs.location.local=Local
+lutinvcs.location.remote=Remote
+lutinvcs.location.unknown=Unknow
+lutinvcs.state.missing=missing
+lutinvcs.state.modified=modified
+lutinvcs.state.outofdate=out of date
+lutinvcs.state.outofdateAndModified=out of date and modified
+lutinvcs.state.removed=removed
+lutinvcs.state.unknown=unknown
+lutinvcs.state.unversionned=unversionned
+lutinvcs.state.unversionnedOrMissing=unversionned or missing
+lutinvcs.state.uptodate=uptodate
Modified: trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties 2008-04-06 19:17:37 UTC (rev 434)
+++ trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties 2008-04-06 19:23:45 UTC (rev 435)
@@ -1 +1,30 @@
lutinvcs.error.thread.action=
+lutinvcs.action.add=Ajouter
+lutinvcs.action.changeLog=journal des changements
+lutinvcs.action.checkout=R\u00E9cup\u00E9rer
+lutinvcs.action.commit=Commiter
+lutinvcs.action.delete=Supprimer
+lutinvcs.action.diff=voir les diff\u00E9rences
+lutinvcs.action.overwriteAndUpdate=Update
+lutinvcs.action.refresh=Rafra\u00EEchir
+lutinvcs.action.revert=Annuler les modifications
+lutinvcs.action.update=Mettre \u00E0 jour
+lutinvcs.error.checkout.dir=Ne peut pas uploader le fichier ''{0}''
+lutinvcs.error.connexion.noinit=La connexion {0} n''a pas \u00E9t\u00E9 initialis\u00E9e
+lutinvcs.error.connexion.noopen=La connexion {0} n''a pas \u00E9t\u00E9 ouverte
+lutinvcs.error.provider.init.connexion=Erreur lors de l''instanciation de la connexion {0}, provider {1}, cause\: {2}
+lutinvcs.error.provider.init.handler=Erreur lors de l''instanciation du handler {0}, provider {1}, cause\: {2}
+lutinvcs.location.all=All
+lutinvcs.location.local=Local
+lutinvcs.location.remote=Remote
+lutinvcs.location.unknown=Unknow
+lutinvcs.state.missing=non pr\u00E9sent
+lutinvcs.state.modified=modifi\u00E9
+lutinvcs.state.outofdate=obsol\u00E8te
+lutinvcs.state.outofdateAndModified=modifi\u00E9 et obsol\u00E8te
+lutinvcs.state.removed=supprim\u00E9
+lutinvcs.state.unknown=\u00E9tat inconnu
+lutinvcs.state.unversionned=non versionn\u00E9
+lutinvcs.state.unversionnedOrMissing=non versionn\u00E9 ou non pr\u00E9sent localement
+lutinvcs.state.uptodate=fichier \u00E0 jour
+
1
0
[Buix-commits] r434 - trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 19:17:37 +0000 (Sun, 06 Apr 2008)
New Revision: 434
Modified:
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java
Log:
remove module api, now just the core-module :)
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java 2008-04-06 19:17:09 UTC (rev 433)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java 2008-04-06 19:17:37 UTC (rev 434)
@@ -85,16 +85,14 @@
AbstractVCSEntriesTableModel fileStatesModel = getModel().getEntriesModel();
table.setModel(fileStatesModel);
table.addMouseListener(new ListMouseListener(getUi(), fileStatesModel, location));
- AbstractVCSPopup popup = getUi().getPopup(location);
- popup.setDispatchAction(new AbstractAction() {
+ getUi().getPopup(location).setDispatchAction(new AbstractAction() {
private static final long serialVersionUID = 8622118724992019898L;
public void actionPerformed(ActionEvent e) {
doAction(VCSAction.valueOf(e.getActionCommand()), true);
}
-
});
}
1
0