/** * Sends a message to the client to be presented to users, with possible * commands to execute */ public void sendActionableNotification(MessageType severity, String message, Object data, List<Command> commands) { ActionableNotification notification = new ActionableNotification().withSeverity(severity).withMessage(message).withData(data).withCommands(commands); sendActionableNotification(notification); }
String cmd = "java.projectConfiguration.status"; TextDocumentIdentifier uri = new TextDocumentIdentifier(uriString); ActionableNotification updateProjectConfigurationNotification = new ActionableNotification().withSeverity(MessageType.Info) .withMessage("A build file was modified. Do you want to synchronize the Java classpath/configuration?").withCommands(asList(new Command("Never", cmd, asList(uri, FeatureStatus.disabled)), new Command("Now", cmd, asList(uri, FeatureStatus.interactive)), new Command("Always", cmd, asList(uri, FeatureStatus.automatic))));
if (severity.compareTo(Preferences.Severity.ignore) > 0){ ActionableNotification ignoreIncompleteClasspath = new ActionableNotification() .withSeverity(severity.toMessageType()) .withMessage(msg) .withCommands(Arrays.asList(