(A) Upon becoming a candidate for a nonjudicial elective office, a judge shall resign from judicial office, unless permitted by law to continue to hold judicial office.
(B) Upon becoming a candidate for a nonjudicial appointive office, a judge is not required to resign from judicial office, provided that the judge complies with the other provisions of this Code.
 In campaigns for nonjudicial elective public office, candidates may make pledges, promises, or commitments related to positions they would take and ways they would act if elected to office. Although appropriate in nonjudicial campaigns, this manner of campaigning is inconsistent with the role of a judge, who must remain fair and impartial to all who come before him or her. The potential for misuse of the judicial office, and the political promises that the judge would be compelled to make in the course of campaigning for nonjudicial elective office, together dictate that a judge who wishes to run for such an office must resign upon becoming a candidate.
 The “resign to run” rule set forth in paragraph (A) ensures that a judge cannot use the judicial office to promote his or her candidacy, and prevents post-campaign retaliation from the judge in the event the judge is defeated in the election. When a judge is seeking appointive nonjudicial office, however, the dangers are not sufficient to warrant imposing the “resign to run” rule.