78a79,81 > public ConnectionTool(DrawingEditor newDrawingEditor, ConnectionFigure newPrototype) { > super(newDrawingEditor); > fPrototype = newPrototype; 79,81d78 < public ConnectionTool(DrawingView view, ConnectionFigure prototype) { < super(view); < fPrototype = prototype; 99a100,101 > setTargetFigure(findConnectionStart(ex, ey, drawing())); > if (getTargetFigure() != null) { 100,101d99 < setTarget(findConnectionStart(ex, ey, drawing())); < if (getTarget() != null) { 102,102c102,102 < setStartConnector(findConnector(ex, ey, getTarget())); --- > setStartConnector(findConnector(ex, ey, getTargetFigure())); 171a172,172 > setAddedFigure(null); 176a178,178 > if (getTargetFigure() != null) { 177,177d177 < if (getTarget() != null) { 178,178c179,179 < getTarget().connectorVisibility(false); --- > getTargetFigure().connectorVisibility(false); 233a235,235 > * Gets the connection which is created by this tool 234,234d234 < * Gets the currently created figure 250a252,254 > if (c != getTargetFigure()) { > if (getTargetFigure() != null) { > getTargetFigure().connectorVisibility(false); 251,253d251 < if (c != getTarget()) { < if (getTarget() != null) { < getTarget().connectorVisibility(false); 254a256,257 > setTargetFigure(c); > if (getTargetFigure() != null) { 254,254c255,255 < } --- > } 255,256d255 < setTarget(c); < if (getTarget() != null) { 257,257c258,258 < getTarget().connectorVisibility(true); --- > getTargetFigure().connectorVisibility(true); 323,323c324,324 < private void setTarget(Figure newTarget) { --- > private void setTargetFigure(Figure newTarget) { 327,327c328,328 < protected Figure getTarget() { --- > protected Figure getTargetFigure() {