Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r4105 - trunk/subclipse/org.tigris.subversion.subclipse.graph/src/org/tigris/subversion/subclipse/graph/cache

subclipse
Discussion topic

Back to topic list

svn commit: r4105 - trunk/subclipse/org.tigris.subversion.subclipse.graph/src/org/tigris/subversion/subclipse/graph/cache

Author selsemore
Full name Stephen Elsemore
Date 2008-11-21 06:21:52 PST
Message Author: selsemore
Date: 2008-11-21 06:21:52-0800
New Revision: 4105

Modified:
   trunk/subclipse/org.​tigris.subversion.su​bclipse.graph/src/or​g/tigris/subversion/​subclipse/graph/cach​e/Graph.java
   trunk/subclipse/org.​tigris.subversion.su​bclipse.graph/src/or​g/tigris/subversion/​subclipse/graph/cach​e/Node.java

Log:
Revision graph - Update properties view when revision selected (regression fix)

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.graph/src/or​g/tigris/subversion/​subclipse/graph/cach​e/Graph.java
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​graph/src/org/tigris​/subversion/subclips​e/graph/cache/Graph.​java?view=diff&r​ev=4105&p1=trunk​/subclipse/org.tigri​s.subversion.subclip​se.graph/src/org/tig​ris/subversion/subcl​ipse/graph/cache/Gra​ph.java&p2=trunk​/subclipse/org.tigri​s.subversion.subclip​se.graph/src/org/tig​ris/subversion/subcl​ipse/graph/cache/Gra​ph.java&r1=4104​&r2=4105
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.graph/src/or​g/tigris/subversion/​subclipse/graph/cach​e/Graph.java (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.graph/src/or​g/tigris/subversion/​subclipse/graph/cach​e/Graph.java 2008-11-21 06:21:52-0800
@@ -1,8 +1,6 @@
 package org.tigris.subversio​n.subclipse.graph.ca​che;
 
 import java.io.Serializable;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -10,11 +8,7 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.eclipse.ui.views​.properties.IPropert​yDescriptor;
-import org.eclipse.ui.views​.properties.IPropert​ySource;
-import org.eclipse.ui.views​.properties.Property​Descriptor;
-
-public class Graph implements Serializable, IPropertySource {
+public class Graph implements Serializable {
 
     private static final String[] EMPTY_STRING = {};
     private static final long serialVersionUID = -5285462558875510455L;
@@ -28,32 +22,6 @@
     private transient long selectedRevision;
     private transient Node selectedNode;
     
- private static DateFormat dateFormat;
-
- public static String P_ID_ACTION = "action";
- public static String P_ACTION = "Action";
- public static String P_ID_PATH = "path";
- public static String P_PATH = "Path";
- public static String P_ID_DATE = "date";
- public static String P_DATE = "Date";
- public static String P_ID_AUTHOR = "author";
- public static String P_AUTHOR = "Author";
- public static String P_ID_FROM = "from";
- public static String P_FROM = "From";
- public static String P_ID_MSG = "msg";
- public static String P_MSG = "Message";
- public static List descriptors;
- static
- {
- descriptors = new ArrayList();
- descriptors.add(new PropertyDescriptor(P_ID_ACTION, P_ACTION));
- descriptors.add(new PropertyDescriptor(P_ID_PATH, P_PATH));
- descriptors.add(new PropertyDescriptor(P_ID_DATE, P_DATE));
- descriptors.add(new PropertyDescriptor(P_ID_AUTHOR, P_AUTHOR));
- descriptors.add(new PropertyDescriptor(P_ID_MSG, P_MSG));
- descriptors.add(new PropertyDescriptor(P_ID_FROM, P_FROM));
- }
-
     public Node getSelectedNode() {
         return selectedNode;
     }
@@ -124,67 +92,5 @@
             pathsArray = (String[]) paths.toArray(EMPTY_STRING);
         return pathsArray;
     }
-
- public Object getEditableValue() {
- return "";
- }
-
- public IPropertyDescriptor[] getPropertyDescriptors() {
- return (IPropertyDescriptor​[])getDescriptors().​toArray(new IPropertyDescriptor[​getDescriptors().siz​e()]);
- }
-
- private static List getDescriptors() {
- return descriptors;
- }
-
- public Object getPropertyValue(Object propKey) {
- if (getSelectedNode() == null) return "";
- if (P_ID_MSG.equals(propKey)) {
- if (getSelectedNode().getMessage() != null) {
- return getSelectedNode().getMessage();
- }
- }
- if (P_ID_AUTHOR.equals(propKey)) {
- if (getSelectedNode().getAuthor() != null) {
- return getSelectedNode().getAuthor();
- }
- }
- if (P_ID_ACTION.equals(propKey)) {
- return getSelectedNode().getAction() + "";
- }
- if (P_ID_PATH.equals(propKey)) {
- if (getSelectedNode().getPath() != null) {
- return getSelectedNode().getPath();
- }
- }
- if (P_ID_FROM.equals(propKey)) {
- if (getSelectedNode().g​etCopySrcPath() != null) {
- return "r"+Long.toString(ge​tSelectedNode().getC​opySrcRevision())+" "+getSelectedNode().​getCopySrcPath();
- }
- }
- if (P_ID_DATE.equals(propKey)) {
- if (getSelectedNode().g​etRevisionDate() != null) {
- return getDateFormat().form​at(getSelectedNode()​.getRevisionDate());​
- }
- }
- return "";
- }
-
- public boolean isPropertySet(Object arg0) {
- return false;
- }
-
- public void resetPropertyValue(Object arg0) {
- }
-
- public void setPropertyValue(Object arg0, Object arg1) {
- }
-
- private static DateFormat getDateFormat() {
- if(dateFormat == null) {
- dateFormat = SimpleDateFormat.get​DateTimeInstance(Dat​eFormat.MEDIUM, DateFormat.MEDIUM);
- }
- return dateFormat;
- }
     
 }

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.graph/src/or​g/tigris/subversion/​subclipse/graph/cach​e/Node.java
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/org.tigris.s​ubversion.subclipse.​graph/src/org/tigris​/subversion/subclips​e/graph/cache/Node.j​ava?view=diff&re​v=4105&p1=trunk/​subclipse/org.tigris​.subversion.subclips​e.graph/src/org/tigr​is/subversion/subcli​pse/graph/cache/Node​.java&p2=trunk/s​ubclipse/org.tigris.​subversion.subclipse​.graph/src/org/tigri​s/subversion/subclip​se/graph/cache/Node.​java&r1=4104​&r2=4105
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.graph/src/or​g/tigris/subversion/​subclipse/graph/cach​e/Node.java (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.graph/src/or​g/tigris/subversion/​subclipse/graph/cach​e/Node.java 2008-11-21 06:21:52-0800
@@ -1,12 +1,18 @@
 package org.tigris.subversio​n.subclipse.graph.ca​che;
 
 import java.io.Serializable;
+import java.text.DateFormat;
 import java.text.MessageFormat;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
-public class Node implements Serializable {
+import org.eclipse.ui.views​.properties.IPropert​yDescriptor;
+import org.eclipse.ui.views​.properties.IPropert​ySource;
+import org.eclipse.ui.views​.properties.Property​Descriptor;
+
+public class Node implements Serializable, IPropertySource {
     
     private static final long serialVersionUID = 2835522933811459843L;
     
@@ -31,6 +37,32 @@
     
     private transient Branch branch;
     private transient int index;
+
+ private static DateFormat dateFormat;
+
+ public static String P_ID_ACTION = "action";
+ public static String P_ACTION = "Action";
+ public static String P_ID_PATH = "path";
+ public static String P_PATH = "Path";
+ public static String P_ID_DATE = "date";
+ public static String P_DATE = "Date";
+ public static String P_ID_AUTHOR = "author";
+ public static String P_AUTHOR = "Author";
+ public static String P_ID_FROM = "from";
+ public static String P_FROM = "From";
+ public static String P_ID_MSG = "msg";
+ public static String P_MSG = "Message";
+ public static List descriptors;
+ static
+ {
+ descriptors = new ArrayList();
+ descriptors.add(new PropertyDescriptor(P_ID_ACTION, P_ACTION));
+ descriptors.add(new PropertyDescriptor(P_ID_PATH, P_PATH));
+ descriptors.add(new PropertyDescriptor(P_ID_DATE, P_DATE));
+ descriptors.add(new PropertyDescriptor(P_ID_AUTHOR, P_AUTHOR));
+ descriptors.add(new PropertyDescriptor(P_ID_MSG, P_MSG));
+ descriptors.add(new PropertyDescriptor(P_ID_FROM, P_FROM));
+ }
 
     public Node() {
     }
@@ -176,4 +208,65 @@
         return index;
     }
     
+ public Object getEditableValue() {
+ return "r" + revision;
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ return (IPropertyDescriptor​[])getDescriptors().​toArray(new IPropertyDescriptor[​getDescriptors().siz​e()]);
+ }
+
+ private static List getDescriptors() {
+ return descriptors;
+ }
+
+ public Object getPropertyValue(Object propKey) {
+ if (P_ID_MSG.equals(propKey)) {
+ if (message != null) {
+ return message;
+ }
+ }
+ if (P_ID_AUTHOR.equals(propKey)) {
+ if (author != null) {
+ return author;
+ }
+ }
+ if (P_ID_ACTION.equals(propKey)) {
+ return action + "";
+ }
+ if (P_ID_PATH.equals(propKey)) {
+ if (path != null) {
+ return path;
+ }
+ }
+ if (P_ID_FROM.equals(propKey)) {
+ if (copySrcPath != null) {
+ return "r"+Long.toString(co​pySrcRevision)+" "+copySrcPath;
+ }
+ }
+ if (P_ID_DATE.equals(propKey)) {
+ if (revisionDate != null) {
+ return getDateFormat().form​at(revisionDate);
+ }
+ }
+ return "";
+ }
+
+ public boolean isPropertySet(Object arg0) {
+ return false;
+ }
+
+ public void resetPropertyValue(Object arg0) {
+ }
+
+ public void setPropertyValue(Object arg0, Object arg1) {
+ }
+
+ private static DateFormat getDateFormat() {
+ if(dateFormat == null) {
+ dateFormat = SimpleDateFormat.get​DateTimeInstance(Dat​eFormat.MEDIUM, DateFormat.MEDIUM);
+ }
+ return dateFormat;
+ }
+
 }

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r4105 - trunk/subclipse/org.tigris.subversion.subclipse.graph/src/org/tigris/subversion/subclipse/graph/cache selsemore Stephen Elsemore 2008-11-21 06:21:52 PST
Messages per page: