Use WWD node fragments.
For the ease of use let's rely on WWD node.js redistributable so users
don't have to manually install node.js.
Change-Id: I32779335ee3f5c94d733c3fa68d1b593f9206667
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/c/linuxtools/org.eclipse.linuxtools/+/166215
Tested-by: Linux Tools Bot <linuxtools-bot@eclipse.org>
diff --git a/containers/org.eclipse.linuxtools.docker.editor.ls/.settings/org.eclipse.jdt.ui.prefs b/containers/org.eclipse.linuxtools.docker.editor.ls/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..4d0957f
--- /dev/null
+++ b/containers/org.eclipse.linuxtools.docker.editor.ls/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,72 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=true
+sp_cleanup.convert_to_enhanced_for_loop=true
+sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.lazy_logical_operator=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.merge_conditional_blocks=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.number_suffix=false
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.push_down_negation=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_modifiers=true
+sp_cleanup.remove_redundant_semicolons=true
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_array_creation=true
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.simplify_lambda_expression_and_method_ref=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_autoboxing=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_directly_map_method=true
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+sp_cleanup.use_unboxing=false
+sp_cleanup.use_var=false
diff --git a/containers/org.eclipse.linuxtools.docker.editor.ls/META-INF/MANIFEST.MF b/containers/org.eclipse.linuxtools.docker.editor.ls/META-INF/MANIFEST.MF
index 834c7d6..d6bd146 100644
--- a/containers/org.eclipse.linuxtools.docker.editor.ls/META-INF/MANIFEST.MF
+++ b/containers/org.eclipse.linuxtools.docker.editor.ls/META-INF/MANIFEST.MF
@@ -12,6 +12,7 @@
org.eclipse.core.contenttype,
org.eclipse.tm4e.registry;bundle-version="0.1.0",
org.eclipse.tm4e.ui;bundle-version="0.1.0",
- org.eclipse.core.runtime;bundle-version="3.13.0"
+ org.eclipse.core.runtime;bundle-version="3.13.0",
+ org.eclipse.wildwebdeveloper.embedder.node
Eclipse-BundleShape: dir
Automatic-Module-Name: org.eclipse.linuxtools.docker.editor.ls
diff --git a/containers/org.eclipse.linuxtools.docker.editor.ls/src/org/eclipse/linuxtools/docker/editor/ls/InitializeLaunchConfigurations.java b/containers/org.eclipse.linuxtools.docker.editor.ls/src/org/eclipse/linuxtools/docker/editor/ls/InitializeLaunchConfigurations.java
index 4834f4d..6616f00 100644
--- a/containers/org.eclipse.linuxtools.docker.editor.ls/src/org/eclipse/linuxtools/docker/editor/ls/InitializeLaunchConfigurations.java
+++ b/containers/org.eclipse.linuxtools.docker.editor.ls/src/org/eclipse/linuxtools/docker/editor/ls/InitializeLaunchConfigurations.java
@@ -1,6 +1,6 @@
/*******************************************************************************
* Copyright (c) 2016 Red Hat Inc. and others.
- *
+ *
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
@@ -10,6 +10,7 @@
package org.eclipse.linuxtools.docker.editor.ls;
import java.io.BufferedReader;
+import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.file.Files;
@@ -18,17 +19,23 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.wildwebdeveloper.embedder.node.NodeJSManager;
public class InitializeLaunchConfigurations {
private static boolean alreadyWarned;
public static String getNodeJsLocation() {
- String res = null;
- String[] command = new String [] { "/bin/bash", "-c", "which node" };
+ File nodeJsRuntime = NodeJSManager.getNodeJsLocation();
+ if (nodeJsRuntime != null) {
+ return nodeJsRuntime.getAbsolutePath();
+ }
+
+ String res = null;
+ String[] command = new String[] { "/bin/bash", "-c", "which node" };
if (Platform.getOS().equals(Platform.OS_WIN32)) {
- command = new String [] { "cmd", "/c", "where node" };
+ command = new String[] { "cmd", "/c", "where node" };
}
BufferedReader reader = null;
@@ -47,7 +54,7 @@
if (res != null && Files.exists(Paths.get(res))) {
return res;
- } else if (!alreadyWarned){
+ } else if (!alreadyWarned) {
warnNodeJSMissing();
alreadyWarned = true;
}
@@ -57,10 +64,9 @@
private static void warnNodeJSMissing() {
Display.getDefault().asyncExec(() -> {
- MessageDialog.openWarning(Display.getCurrent().getActiveShell(),
- "Missing node.js",
- "Could not find node.js. This will result in editors missing key features.\n" +
- "Please make sure node.js is installed and that your PATH environement variable contains the location to the `node` executable.");
+ MessageDialog.openWarning(Display.getCurrent().getActiveShell(), "Missing node.js",
+ "Could not find node.js. This will result in editors missing key features.\n"
+ + "Please make sure node.js is installed and that your PATH environement variable contains the location to the `node` executable.");
});
}
diff --git a/releng/org.eclipse.linuxtools.target/linuxtools-e4.17.target b/releng/org.eclipse.linuxtools.target/linuxtools-e4.17.target
index f165bc9..ef3a5da 100644
--- a/releng/org.eclipse.linuxtools.target/linuxtools-e4.17.target
+++ b/releng/org.eclipse.linuxtools.target/linuxtools-e4.17.target
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
-<target name="linuxtools-e4.17" sequenceNumber="1">
+<target name="linuxtools-e4.17" sequenceNumber="2">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="com.fasterxml.jackson.core.jackson-annotations" version="2.10.3.v20200512-1600"/>
@@ -97,6 +97,10 @@
<repository location="https://download.eclipse.org/reddeer/releases/latest/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.wildwebdeveloper.embedder.node.feature.feature.group" version="0.0.0"/>
+<repository location="https://download.eclipse.org/wildwebdeveloper/snapshots/"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.swtchart.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.swtchart.feature.source.feature.group" version="0.0.0"/>
<repository location="https://download.eclipse.org/swtchart/releases/0.12.0/repository"/>