Synchronizing Source When Updating an Interface
- After adding or changing methods to an interface, wait a few seconds for
parsing to occur. The Confirm Changes dialog box appears. The dialog
box displays the updated methods for the first class found in the Explorer
that implements the interface.
Automatic synchronization works only for interfaces, not abstract superclasses.
If you have multiple source files that implement the changed interface,
a separate Confirm Changes dialog box is displayed for each file.
- To add or update methods, select one of the following options:
- Process All adds or updates all of the new or changed interface
methods in the class.
- Process adds or updates only those methods you select in the Changes
list.
If you do not want to add or update methods, make no selections.
- Click Close.
Automatic synchronization happens when you update the methods in an interface in
any of the following ways:
-
Manually update the code in the Source Editor.
-
Update the method using Properties or Customizer on the class node.
(In the Explorer, right-click the class node and choose Properties or Customize
from the contextual menu.)
-
Add a new method to the interface by choosing New
Method from the contextual menu of the interface's node.
OpenAPI calls from other modules to
setName(), setParameters(), setExceptions(), setReturnType(),
addMethod(),
or addMethods()
also trigger automatic
synchronization.
If you have disabled automatic synchronization for any classes that implement
an interface or extend an abstract superclass, you can still synchronize those
classes. Choose Tools
Synchronize from each
class's contextual menu.
The Synchronize command updates methods in non-abstract classes only.
 |
Automatic synchronization works in most cases, but there may be an occasional
problem with more complex inheritance hierarchies. If the compiler says
your class has methods that are declared but not implemented, invoke source
synchronization on the class manually using Tools
Synchronize from the
class's contextual menu. This will invoke source synchronization all the
way up the inheritance hierarchy, which may resolve your compilation error.
|
Legal Notices