UNFORTUNATELY FOR THE city of Alexandria, James M. Thomson has decided to continue his campaign for the judgeship there. He has now been repudiated twice in Alexandria -- once in 1977, when the voters declined to re-elect him to the legislative seat that he had held for 21 years, and again earlier this month when the Alexandria Bar Association declined to endorse him for the bench. But the final decision on the judgeship will be made in Richmond, where Mr. Thomson has more and stronger friends than he has at home.

Virginia's system of appointing judges is classically bad -- a procedure that, in the textbooks and academic courses on the subject, serves as the model of the wrong way to do it. By law, a judge is chosen by the legislature; in practice, it's up to a vote, usually secret, in a caucus of the Democratic majority. Since Mr. Thomson was majority leader until his career in the House abruptly ended a year ago, he is very much on familiar ground when he takes his cause to the state capitol.

A good many people in the legislature will find it difficult to understand the depth of the resentment in Alexandria against this move to impose Mr. Thomson on the city's bench. There's been a lot of turnover in the legislature. Only eight of the present members were there in the late 1950s when it was the headquarters for the state's massive resistance against racial desegregation. Most of the present legislators were not around when Mr. Thomson and his investigating committee were vindictively harassing and hounding law-abiding citizens and organizations as they attempted to assert their rights, as the Supreme Court had defined them. For years Mr. Thomson vehemently advocated a view of basic rights from which Alexandria has long since departed, both in law and in the conduct of its daily life. It would be difficult for any black citizen to believe that Mr. Thomson, as a judge, could expunge from his mind the opinions that, as a politician, he repeated over so many years.

More recently, there is the matter of the Equal Rights Amendment. To oppose it, as Mr. Thomson has, is hardly a disqualification in itself.But the manner in which he and his collaborators conducted that opposition -- stifling the bill in committee, preventing it from coming to an open vote on the floor -- suggests, once again, too light a regard for what most people consider fair play in issues concerning citizens' rights.

Speculation suggests that Mr. Thomson may only ask the legislative committees on judicial appointments to declare him qualified for the judgeship. Having secured this vindication, the speculation goes, he might then drop his campaign and avert the ugly struggle that otherwise lies ahead. We do not wish to appear excessively suspicious, but we note that this two-step is not necessarily so benign as it looks. If another Alexandria judgeship were to become vacant while the legislature were out of session, Gov. Dalton might well choose a candidate who had recently been declared qualified by the legislative committees. The governor often looks for ways to win the hearts and minds of the more conservative Democrats and, as the affair of the Metro tax demonstrated, he does not have a reliable sense of opinion in Northern Virginia.

Mr. Thomson is a man of many talents. He is an able lawyer. But his political career over many years has damaged beyond repair his ability to represent justice in the eyes of his neighbors and fellow citizens in Alexandria.