MCPcopy Index your code
hub / github.com/processing/processing / undo

Method undo

app/src/processing/app/contrib/DetailPanel.java:860–881  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

858
859
860 private void undo() {
861 clearStatusMessage();
862 if (contrib instanceof LocalContribution) {
863 LocalContribution installed = getLocalContrib();
864 installed.setDeletionFlag(false);
865 contribListing.replaceContribution(contrib, contrib); // ??
866 Iterator<Contribution> contribsListIter = contribListing.allContributions.iterator();
867 boolean toBeRestarted = false;
868 while (contribsListIter.hasNext()) {
869 Contribution contribElement = contribsListIter.next();
870 if (contrib.getType().equals(contribElement.getType())) {
871 if (contribElement.isDeletionFlagged() ||
872 contribElement.isUpdateFlagged()) {
873 toBeRestarted = !toBeRestarted;
874 break;
875 }
876 }
877 }
878 // TODO: remove or uncomment if the button was added
879 //listPanel.contributionTab.restartButton.setVisible(toBeRestarted);
880 }
881 }
882
883
884 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Callers 1

actionPerformedMethod · 0.95

Calls 11

clearStatusMessageMethod · 0.95
getLocalContribMethod · 0.95
setDeletionFlagMethod · 0.95
getTypeMethod · 0.95
isDeletionFlaggedMethod · 0.95
isUpdateFlaggedMethod · 0.95
replaceContributionMethod · 0.80
nextMethod · 0.65
iteratorMethod · 0.45
hasNextMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected