Login | Register
My pages Projects Community openCollabNet

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

subclipse
Discussion topic

Back to topic list

svn commit: r4103 - trunk/subclipse/org.tigris.subversion.subclipse.graph/src/org/tigris/subversion/subclipse/graph/editors

Author selsemore
Full name Stephen Elsemore
Date 2008-11-20 08:01:43 PST
Message Author: selsemore
Date: 2008-11-20 08:01:42-0800
New Revision: 4103

Modified:
   trunk/subclipse/org.​tigris.subversion.su​bclipse.graph/src/or​g/tigris/subversion/​subclipse/graph/edit​ors/GraphEditPart2.j​ava
   trunk/subclipse/org.​tigris.subversion.su​bclipse.graph/src/or​g/tigris/subversion/​subclipse/graph/edit​ors/RevisionEditPart​.java

Log:
Revision graph - Removed unneeded code.

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.graph/src/or​g/tigris/subversion/​subclipse/graph/edit​ors/GraphEditPart2.j​ava
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/editors/Grap​hEditPart2.java?view​=diff&rev=4103​&p1=trunk/subclips​e/org.tigris.subvers​ion.subclipse.graph/​src/org/tigris/subve​rsion/subclipse/grap​h/editors/GraphEditP​art2.java&p2=tru​nk/subclipse/org.tig​ris.subversion.subcl​ipse.graph/src/org/t​igris/subversion/sub​clipse/graph/editors​/GraphEditPart2.java​&r1=4102&r2=​4103
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.graph/src/or​g/tigris/subversion/​subclipse/graph/edit​ors/GraphEditPart2.j​ava (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.graph/src/or​g/tigris/subversion/​subclipse/graph/edit​ors/GraphEditPart2.j​ava 2008-11-20 08:01:42-0800
@@ -25,10 +25,8 @@
 import org.eclipse.draw2d.g​eometry.Rectangle;
 import org.eclipse.gef.EditPolicy;
 import org.eclipse.gef.edit​parts.AbstractGraphi​calEditPart;
-import org.eclipse.gef.edit​policies.SelectionEd​itPolicy;
 import org.eclipse.gef.ui.p​arts.ScrollingGraphi​calViewer;
 import org.eclipse.jface.pr​eference.IPreference​Store;
-import org.eclipse.jface.vi​ewers.IStructuredSel​ection;
 import org.eclipse.swt.graphics.Color;
 import org.tigris.subversio​n.subclipse.graph.Ac​tivator;
 import org.tigris.subversio​n.subclipse.graph.ca​che.Branch;
@@ -63,15 +61,7 @@
     }
 
     protected void createEditPolicies() {
- installEditPolicy(Ed​itPolicy.SELECTION_F​EEDBACK_ROLE, new SelectionEditPolicy() {
- protected void hideSelection() {
-// System.out.println("hide graph");
- }
-
- protected void showSelection() {
-// System.out.println("show graph");
- }
- });
+ installEditPolicy(Ed​itPolicy.SELECTION_F​EEDBACK_ROLE, null);
     }
 
     protected List getModelChildren() {
@@ -240,36 +230,6 @@
         selected = figure;
         if (figure == null) graph.setSelectedNode(null);
         else graph.setSelectedNod​e(figure.getNode());​
- getViewer().setSelection(new IStructuredSelection() {
-
- public Object getFirstElement() {
- return GraphEditPart2.this;
- }
-
- public Iterator iterator() {
- return toList().iterator();
- }
-
- public int size() {
- return toArray().length;
- }
-
- public Object[] toArray() {
- Object[] selectedObjects = { GraphEditPart2.this };
- return selectedObjects;
- }
-
- public List toList() {
- List list = new ArrayList();
- list.add(GraphEditPart2.this);
- return list;
- }
-
- public boolean isEmpty() {
- return false;
- }
-
- });
     }
 
     public NodeFigure getSelectedNode() {

Modified: trunk/subclipse/org.​tigris.subversion.su​bclipse.graph/src/or​g/tigris/subversion/​subclipse/graph/edit​ors/RevisionEditPart​.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/editors/Revi​sionEditPart.java?vi​ew=diff&rev=4103​&p1=trunk/subcli​pse/org.tigris.subve​rsion.subclipse.grap​h/src/org/tigris/sub​version/subclipse/gr​aph/editors/Revision​EditPart.java&p2​=trunk/subclipse/org​.tigris.subversion.s​ubclipse.graph/src/o​rg/tigris/subversion​/subclipse/graph/edi​tors/RevisionEditPar​t.java&r1=4102​&r2=4103
====================​====================​====================​==================
--- trunk/subclipse/org.​tigris.subversion.su​bclipse.graph/src/or​g/tigris/subversion/​subclipse/graph/edit​ors/RevisionEditPart​.java (original)
+++ trunk/subclipse/org.​tigris.subversion.su​bclipse.graph/src/or​g/tigris/subversion/​subclipse/graph/edit​ors/RevisionEditPart​.java 2008-11-20 08:01:42-0800
@@ -2,9 +2,6 @@
 
 import java.util.Iterator;
 
-import org.eclipse.draw2d.B​orderLayout;
-import org.eclipse.draw2d.C​olorConstants;
-import org.eclipse.draw2d.Figure;
 import org.eclipse.draw2d.IFigure;
 import org.eclipse.draw2d.g​eometry.Rectangle;
 import org.eclipse.gef.EditPolicy;
@@ -23,12 +20,6 @@
     }
 
     protected IFigure createFigure() {
- Figure f = new Figure();
- f.setBackgroundColor​(ColorConstants.whit​e);
- f.setOpaque(true);
- BorderLayout layout = new BorderLayout();
- f.setLayoutManager(layout);
-
         Node node = (Node)getModel();
         GraphEditPart2 graphEditPart = (GraphEditPart2)getP​arent().getParent();​
         NodeFigure nodeFigure = graphEditPart.getNod​eFigure(node);
@@ -44,30 +35,19 @@
         }
         
         nodeFigure.endLayout();
-
- f.add(nodeFigure, BorderLayout.CENTER);
-
- Rectangle rect = new Rectangle(NODE_OFFSET_X, 10+BranchEditPart.BR​ANCH_HEIGHT+node.get​Index()*NODE_OFFSET_​Y, NODE_WIDTH, NODE_HEIGHT);
- ((AbstractGraphicalE​ditPart)getParent())​.getFigure().getLayo​utManager().setConst​raint(f, rect);
 
-
- return f;
- }
+ Rectangle rect = new Rectangle(NODE_OFFSET_X, 10+BranchEditPart.BR​ANCH_HEIGHT+node.get​Index()*NODE_OFFSET_​Y, NODE_WIDTH, NODE_HEIGHT);
+ ((AbstractGraphicalE​ditPart)getParent())​.getFigure().getLayo​utManager().setConst​raint(nodeFigure, rect);
 
- public boolean isSelectable() {
-// System.out.println("​RevisionEditPart.isS​electable");
- return true;
+ return nodeFigure;
     }
 
     protected void createEditPolicies() {
         installEditPolicy(Ed​itPolicy.SELECTION_F​EEDBACK_ROLE, new SelectionEditPolicy() {
             protected void hideSelection() {
-// System.out.println("hide revision");
             }
-
             protected void showSelection() {
-// System.out.println("show revision");
- }
+ }
         });
     }

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

Messages

Show all messages in topic

svn commit: r4103 - trunk/subclipse/org.tigris.subversion.subclipse.graph/src/org/tigris/subversion/subclipse/graph/editors selsemore Stephen Elsemore 2008-11-20 08:01:43 PST
Messages per page: