-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f23fd44
commit 418b9bc
Showing
22 changed files
with
452 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...va/com/redhat/devtools/intellij/lsp4ij/operations/completion/LSPCompletionConfidence.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.redhat.devtools.intellij.lsp4ij.operations.completion; | ||
|
||
import com.intellij.codeInsight.completion.CompletionConfidence; | ||
import com.intellij.psi.PsiElement; | ||
import com.intellij.psi.PsiFile; | ||
import com.intellij.util.ThreeState; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class LSPCompletionConfidence extends CompletionConfidence { | ||
|
||
@Override | ||
public @NotNull ThreeState shouldSkipAutopopup(@NotNull PsiElement contextElement, @NotNull PsiFile psiFile, int offset) { | ||
return ThreeState.NO; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 0 additions & 98 deletions
98
src/main/java/com/redhat/devtools/intellij/qute/lang/QuteLexer.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/main/java/com/redhat/devtools/intellij/qute/lang/QuteToken.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.redhat.devtools.intellij.qute.lang; | ||
|
||
import com.intellij.psi.*; | ||
import com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry; | ||
import com.intellij.psi.impl.source.tree.LeafPsiElement; | ||
import com.intellij.psi.impl.source.xml.TagNameReference; | ||
import com.intellij.psi.tree.IElementType; | ||
import com.intellij.psi.xml.XmlToken; | ||
import com.intellij.psi.xml.XmlTokenType; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class QuteToken extends LeafPsiElement { | ||
|
||
public QuteToken(@NotNull IElementType type, CharSequence text) { | ||
super(type, text); | ||
} | ||
|
||
@Override | ||
public PsiReference @NotNull [] getReferences() { | ||
return getReferences(PsiReferenceService.Hints.NO_HINTS); | ||
} | ||
|
||
//@Override | ||
public PsiReference @NotNull [] getReferences(PsiReferenceService.@NotNull Hints hints) { | ||
/*final IElementType elementType = getElementType(); | ||
if (elementType == XmlTokenType.XML_DATA_CHARACTERS || | ||
elementType == XmlTokenType.XML_CHAR_ENTITY_REF) { | ||
return ReferenceProvidersRegistry.getReferencesFromProviders(this, hints); | ||
} else if (elementType == XmlTokenType.XML_NAME && getParent() instanceof PsiErrorElement) { | ||
final PsiElement element = getPrevSibling(); | ||
if (element instanceof XmlToken && ((XmlToken)element).getTokenType() == XmlTokenType.XML_END_TAG_START) { | ||
return new PsiReference[] {TagNameReference.createTagNameReference(this, getNode(), false)}; | ||
} | ||
} | ||
return super.getReferences();*/ | ||
return new PsiReference[] { new PsiQuteReference(this.getNode())}; | ||
} | ||
|
||
} |
Oops, something went wrong.