Index: applications/editors/josm/plugins/cadastre-fr/build.xml
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/build.xml	(revision 17526)
+++ applications/editors/josm/plugins/cadastre-fr/build.xml	(revision 17528)
@@ -27,5 +27,5 @@
                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/FR:JOSM/Fr:Plugin/Cadastre"/>
                 <attribute name="Plugin-Mainversion" value="2012"/>
-                <attribute name="Plugin-Stage" value="60"/>
+                <attribute name="Plugin-Stage" value="2082"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
             </manifest>
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java	(revision 17526)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java	(revision 17528)
@@ -124,7 +124,5 @@
         refreshMenu();
 
-        // add a hook at uploading to insert/verify the source=cadastre tag
-        LinkedList<UploadHook> hooks = ((UploadAction) Main.main.menu.upload).uploadHooks;
-        hooks.add(0, new CheckSourceUploadHook());
+        UploadAction.registerUploadHook(new CheckSourceUploadHook());
     }
 
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CheckSourceUploadHook.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CheckSourceUploadHook.java	(revision 17526)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CheckSourceUploadHook.java	(revision 17528)
@@ -16,4 +16,5 @@
 import org.openstreetmap.josm.actions.UploadAction.UploadHook;
 import org.openstreetmap.josm.command.ChangePropertyCommand;
+import org.openstreetmap.josm.data.APIDataSet;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -35,9 +36,9 @@
      * Add the tag "source" if it doesn't exist for all new Nodes and Ways before uploading
      */
-    public boolean checkUpload(Collection<OsmPrimitive> add, Collection<OsmPrimitive> update, Collection<OsmPrimitive> delete)
+    public boolean checkUpload(APIDataSet apiDataSet) 
     {
-        if (CadastrePlugin.autoSourcing && CadastrePlugin.pluginUsed && !add.isEmpty()) {
+        if (CadastrePlugin.autoSourcing && CadastrePlugin.pluginUsed && !apiDataSet.getPrimitivesToAdd().isEmpty()) {
             Collection<OsmPrimitive> sel = new HashSet<OsmPrimitive>();
-            for (OsmPrimitive osm : add) {
+            for (OsmPrimitive osm : apiDataSet.getPrimitivesToAdd()) {
                 if ((osm instanceof Node || osm instanceof Way)
                         && (osm.getKeys() == null || !tagSourceExist(osm))) {
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGBuilding.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGBuilding.java	(revision 17526)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGBuilding.java	(revision 17528)
@@ -143,7 +143,7 @@
                         }
                     if (w.getNodesCount() == replaced)
-                        w.delete(true);
+                        w.setDeleted(true);
                 }
-                n.delete(true);
+                n.setDeleted(true);
             }
 
@@ -152,8 +152,8 @@
         Collection<Command> cmds = new LinkedList<Command>();
         for (Node node : svgDataSet.nodes)
-            if (!node.deleted)
+            if (!node.isDeleted())
                 cmds.add(new AddCommand(node));
         for (Way way : svgDataSet.ways)
-            if (!way.deleted)
+            if (!way.isDeleted())
                 cmds.add(new AddCommand(way));
         Main.main.undoRedo.add(new SequenceCommand(tr("Create buildings"), cmds));
@@ -191,5 +191,5 @@
         double epsilon = 0.05; // smallest distance considering duplicate node
         for (Node n : nodes) {
-            if (!n.deleted && !n.incomplete) {
+            if (!n.isDeleted() && !n.incomplete) {
                 double dist = n.getEastNorth().distance(nodeToAdd.getEastNorth());
                 if (dist < epsilon) {
