Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@

public class IsNodeProjectPropertyTester extends PropertyTester {

public static final String JAVASCRIPT_CONTENT_TYPE = "org.eclipse.tm4e.language_pack.javascript";
public static final String TYPESCRIPT_CONTENT_TYPE = "org.eclipse.tm4e.language_pack.typescript";

private static final String IS_NODE_RESOURCE_PROPERTY = "isNodeResource"; //$NON-NLS-1$

@Override public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
Expand All @@ -36,8 +39,8 @@ public class IsNodeProjectPropertyTester extends PropertyTester {
}
if (resource instanceof IFile file) {
IContentTypeManager contentTypeManager = Platform.getContentTypeManager();
IContentType jsContentType = contentTypeManager.getContentType("org.eclipse.wildwebdeveloper.js");
IContentType tsContentType = contentTypeManager.getContentType("org.eclipse.wildwebdeveloper.ts");
IContentType jsContentType = contentTypeManager.getContentType(JAVASCRIPT_CONTENT_TYPE);
IContentType tsContentType = contentTypeManager.getContentType(TYPESCRIPT_CONTENT_TYPE);
try (
InputStream content = file.getContents();
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.Adapters;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.wildwebdeveloper.html.HTMLLanguageServer;

public abstract class AbstractHTMLDebugAdapterLaunchShortcut extends AbstractDebugAdapterLaunchShortcut {

public AbstractHTMLDebugAdapterLaunchShortcut(String launchConfigTypeId) {
super(launchConfigTypeId, "org.eclipse.wildwebdeveloper.html", true);
super(launchConfigTypeId, HTMLLanguageServer.HTML_LANGUAGE_SERVER_ID, true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.ILog;
import org.eclipse.wildwebdeveloper.IsNodeProjectPropertyTester;
import org.eclipse.wildwebdeveloper.debug.AbstractDebugAdapterLaunchShortcut;

public class NodeRunDebugLaunchShortcut extends AbstractDebugAdapterLaunchShortcut {

public NodeRunDebugLaunchShortcut() {
super(NodeRunDAPDebugDelegate.ID, new String[] {"org.eclipse.tm4e.language_pack.javascript", "org.eclipse.tm4e.language_pack.typescript"}, true);
super(NodeRunDAPDebugDelegate.ID, new String[] {IsNodeProjectPropertyTester.JAVASCRIPT_CONTENT_TYPE, IsNodeProjectPropertyTester.TYPESCRIPT_CONTENT_TYPE}, true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
public class HTMLLanguageServer extends ProcessStreamConnectionProviderWithPreference {

private static final String HTML_LANGUAGE_SERVER_ID = "org.eclipse.wildwebdeveloper.html";
public static final String HTML_LANGUAGE_SERVER_ID = "org.eclipse.tm4e.language_pack.html";

private static final String[] SUPPORTED_SECTIONS = { "html", "css", "javascript" };

Expand Down