Skip to content

Commit b421025

Browse files
committed
Merged PR 454676: Do not emit index event for TypeDeclaration
Do not emit index event for TypeDeclaration
1 parent fb80cd7 commit b421025

File tree

4 files changed

+5
-19
lines changed

4 files changed

+5
-19
lines changed

com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors/DefinitionVisitor.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import org.eclipse.jdt.core.dom.SimpleType;
1313
import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
1414
import org.eclipse.jdt.core.dom.Type;
15-
import org.eclipse.jdt.core.dom.TypeDeclaration;
1615
import org.eclipse.jdt.ls.core.internal.JDTUtils;
1716
import org.eclipse.jdt.ls.core.internal.preferences.PreferenceManager;
1817
import org.eclipse.lsp4j.Location;
@@ -34,7 +33,7 @@ public DefinitionVisitor() {
3433
@Override
3534
public boolean visit(SimpleName node) {
3635
emitDefinition(node.getStartPosition(), node.getLength());
37-
return super.visit(node);
36+
return false;
3837
}
3938

4039
@Override
@@ -44,12 +43,6 @@ public boolean visit(SingleVariableDeclaration node) {
4443
return false;
4544
}
4645

47-
@Override
48-
public boolean visit(TypeDeclaration node) {
49-
emitDefinition(node.getStartPosition(), node.getLength());
50-
return true;
51-
}
52-
5346
@Override
5447
public boolean visit(SimpleType node) {
5548
emitDefinition(node.getStartPosition(), node.getLength());

com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors/HoverVisitor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ public HoverVisitor() {
3838
@Override
3939
public boolean visit(SimpleType type) {
4040
emitHover(type.getStartPosition(), type.getLength());
41-
return super.visit(type);
41+
return false;
4242
}
4343

4444
@Override
4545
public boolean visit(SimpleName node) {
4646
emitHover(node.getStartPosition(), node.getLength());
47-
return super.visit(node);
47+
return false;
4848
}
4949

5050
private void emitHover(int startPosition, int length) {

com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors/ReferencesVisitor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ public ReferencesVisitor() {
3535
@Override
3636
public boolean visit(SimpleType type) {
3737
emitReferences(type.getStartPosition(), type.getLength());
38-
return super.visit(type);
38+
return false;
3939
}
4040

4141
@Override
4242
public boolean visit(SimpleName node) {
4343
emitReferences(node.getStartPosition(), node.getLength());
44-
return super.visit(node);
44+
return false;
4545
}
4646

4747
public void emitReferences(int startPosition, int length) {

com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors/TypeDefinitionVisitor.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import org.eclipse.jdt.core.dom.SimpleType;
1414
import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
1515
import org.eclipse.jdt.core.dom.Type;
16-
import org.eclipse.jdt.core.dom.TypeDeclaration;
1716
import org.eclipse.jdt.ls.core.internal.JDTUtils;
1817
import org.eclipse.jdt.ls.core.internal.handlers.NavigateToTypeDefinitionHandler;
1918
import org.eclipse.lsp4j.Location;
@@ -47,12 +46,6 @@ public boolean visit(SingleVariableDeclaration node) {
4746
return false;
4847
}
4948

50-
@Override
51-
public boolean visit(TypeDeclaration node) {
52-
emitTypeDefinition(node.getStartPosition(), node.getLength());
53-
return true;
54-
}
55-
5649
@Override
5750
public boolean visit(SimpleType node) {
5851
emitTypeDefinition(node.getStartPosition(), node.getLength());

0 commit comments

Comments
 (0)