deprecation of getEdgeTo()

User 870ab5b546

02-04-2010 13:44:18

Hi,


In JChem 5.3, you severely deprecated CEdge.getEdgeTo(), so code containing this method won't compile anymore.  It would be nice if it were only partly deprecated, providing warnings but still compiling.  (The same is true of CNode.getLigand(), but at least you replaced it with MolAtom.getLigand().)  


If you can't reenable CEdge.getEdgeTo(), what I would like to see in JChem 5.3 is a new but partly deprecated MolBond.getEdgeTo().  That way, when we have JChem 5.2 code like this:


MolAtom atom2 = (MolAtom) atom1.getLigand(0);
MolBond bond = (MolBond) atom1.getEdgeTo(atom2);

and we compile it with JChem 5.3, it will give us warnings, but it will still work, and we can take our time to convert it to JChem 5.3 code like this:


MolAtom atom2 = atom1.getLigand(0);
MolBond bond = atom1.getBondTo(atom2);

This is important because we are going to be switching back and forth between JChem versions until some of the problems in JChem 5.3 are ironed out, and we want the code to compile in either version until then.


-- Bob

ChemAxon e500b51457

02-04-2010 20:58:45

Hi Bob,


You mentioned CEdge.getEdgeTo(). Do you mean CNode.getEdgeTo() ?  
The MolAtom class already contains the deprecation of getEdgeTo() and calls MolAtom.getBondTo().


Erika.

User 870ab5b546

02-04-2010 23:11:11

Sorry, I meant CNode.getEdgeTo().


I just know that when I compiled code with JChem 5.3.1 that had getEdgeTo() in it, I got errors.

ChemAxon e500b51457

06-04-2010 06:43:28

Hi Bob,

In Marvin 5.3. we have a deprecated getEdgeTo() in MolAtom and a new getBondTo() in MolAtom as you suggested. I am afraid that your suggestion doesn't solve the problem and we should find another solution to this problem.
What type is atom1 in your code?

Regards,
Erika.

User 870ab5b546

06-04-2010 12:46:09

atom1 is a MolAtom as well.  We don't use CNodes or CEdges.


I just want MolAtom.getEdgeTo() to compile in JChem 5.3.  It can remain deprecated, as long as it gives a warning, not an error.


Same is true of Molecule.removeEdge(), removeNode(), replaceEdge(), and insertEdge().  

ChemAxon e500b51457

07-04-2010 09:13:08

Please try to compile the attached example code with -verbose option and send me the error message.



Regards,
Erika