use of org.eclipse.m2e.core.ui.internal.editing.PomEdits.GROUP_ID in project m2e-core by eclipse-m2e.
the class MavenPomEditorPage method updateParentAction.
private void updateParentAction() {
if (selectParentAction != null) {
final boolean[] ret = new boolean[1];
try {
performOnDOMDocument(new OperationTuple(getPomEditor().getDocument(), document -> {
Element parent = findChild(document.getDocumentElement(), PARENT);
String g = getTextValue(findChild(parent, GROUP_ID));
String a = getTextValue(findChild(parent, ARTIFACT_ID));
String v = getTextValue(findChild(parent, VERSION));
ret[0] = g != null && a != null && v != null;
}, true));
} catch (Exception e) {
ret[0] = false;
}
selectParentAction.setEnabled(ret[0]);
}
}
Aggregations