Skip to content
Closed
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 @@ -79,6 +79,44 @@ protected boolean condition() {
}.waitForCondition(PlatformUI.getWorkbench().getDisplay(), 5000), "Diagnostic not published");
}

@Test
public void testSCSSFile() throws Exception {
final IFile file = project.getFile("blah.scss");
file.create(new ByteArrayInputStream("ERROR".getBytes()), true, null);
ITextEditor editor = (ITextEditor) IDE
.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), file);
editor.getDocumentProvider().getDocument(editor.getEditorInput()).set("FAIL");
assertTrue(new DisplayHelper() {
@Override
protected boolean condition() {
try {
return file.findMarkers("org.eclipse.lsp4e.diagnostic", true, IResource.DEPTH_ZERO).length != 0;
} catch (CoreException e) {
return false;
}
}
}.waitForCondition(PlatformUI.getWorkbench().getDisplay(), 5000), "Diagnostic not published");
}

@Test
public void testSASSFile() throws Exception {
final IFile file = project.getFile("blah.sass");
file.create(new ByteArrayInputStream("ERROR".getBytes()), true, null);
ITextEditor editor = (ITextEditor) IDE
.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), file);
editor.getDocumentProvider().getDocument(editor.getEditorInput()).set("FAIL");
assertTrue(new DisplayHelper() {
@Override
protected boolean condition() {
try {
return file.findMarkers("org.eclipse.lsp4e.diagnostic", true, IResource.DEPTH_ZERO).length != 0;
} catch (CoreException e) {
return false;
}
}
}.waitForCondition(PlatformUI.getWorkbench().getDisplay(), 5000), "Diagnostic not published");
}

@Test
public void testHTMLFile() throws Exception {
final IFile file = project.getFile("blah.html");
Expand Down Expand Up @@ -202,7 +240,7 @@ public void testTSXFile() throws Exception {
ITextEditor editor = (ITextEditor) IDE
.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), file);
editor.getDocumentProvider().getDocument(editor.getEditorInput()).set("FAIL");

assertTrue(new DisplayHelper() {
@Override
protected boolean condition() {
Expand All @@ -213,15 +251,15 @@ protected boolean condition() {
}
}
}.waitForCondition(PlatformUI.getWorkbench().getDisplay(), 15000), "Diagnostic not published");

editor.getDocumentProvider().getDocument(editor.getEditorInput()).set("const x = <></>;export default x;");
assertTrue(new DisplayHelper() {
@Override
protected boolean condition() {
try {
IMarker[] markers = file.findMarkers("org.eclipse.lsp4e.diagnostic", true, IResource.DEPTH_ZERO);
for(IMarker m: markers){
if(((String) m.getAttribute(IMarker.MESSAGE)).contains("React")){
for (IMarker m : markers) {
if (((String) m.getAttribute(IMarker.MESSAGE)).contains("React")) {
return true;
}
}
Expand Down
105 changes: 82 additions & 23 deletions org.eclipse.wildwebdeveloper/grammars/css/css.tmLanguage.json

Large diffs are not rendered by default.

13 changes: 3 additions & 10 deletions org.eclipse.wildwebdeveloper/grammars/less/less.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,9 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/atom/language-less/commit/87d4d59e8de6796b506b81a16e1dc1fafc99d30f",
"name": "Less",
"scopeName": "source.css.less",
"fileTypes": [
"less",
"less.erb",
"rc",
"gtkrc",
"gtkrc-2.0",
"themerc"
],
"patterns": [
{
"include": "#strings"
Expand Down Expand Up @@ -444,7 +437,7 @@
"name": "string.quoted.double.css",
"patterns": [
{
"match": "\\\\(\\h{1,6}|.)",
"match": "\\\\([0-9A-Fa-f]{1,6}|.)",
"name": "constant.character.escape.css"
},
{
Expand All @@ -468,7 +461,7 @@
"name": "string.quoted.single.css",
"patterns": [
{
"match": "\\\\(\\h{1,6}|.)",
"match": "\\\\([0-9A-Fa-f]{1,6}|.)",
"name": "constant.character.escape.css"
},
{
Expand Down
Loading