Skip to content

Commit 1527b42

Browse files
committed
Removed (apparently never activated) DocLinkGenerator
1 parent bc4498a commit 1527b42

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

app/src/processing/app/syntax/SketchTextArea.java

-45
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,11 @@ public SketchTextArea(RSyntaxDocument document, PdeKeywords pdeKeywords) throws
8989

9090
public void setKeywords(PdeKeywords keywords) {
9191
pdeKeywords = keywords;
92-
setLinkGenerator(new DocLinkGenerator(pdeKeywords));
9392
}
9493

9594
private void installFeatures() throws IOException {
9695
setTheme(PreferencesData.get("editor.syntax_theme", "default"));
9796

98-
setLinkGenerator(new DocLinkGenerator(pdeKeywords));
99-
10097
setSyntaxEditingStyle(SYNTAX_STYLE_CPLUSPLUS);
10198
}
10299

@@ -175,48 +172,6 @@ public void getTextLine(int line, Segment segment) {
175172
}
176173
}
177174

178-
private static class DocLinkGenerator implements LinkGenerator {
179-
180-
private final PdeKeywords pdeKeywords;
181-
182-
public DocLinkGenerator(PdeKeywords pdeKeywords) {
183-
this.pdeKeywords = pdeKeywords;
184-
}
185-
186-
@Override
187-
public LinkGeneratorResult isLinkAtOffset(RSyntaxTextArea textArea, final int offs) {
188-
Token token = textArea.modelToToken(offs);
189-
if (token == null) {
190-
return null;
191-
}
192-
193-
String reference = pdeKeywords.getReference(token.getLexeme());
194-
195-
if (reference != null || (token.getType() == TokenTypes.DATA_TYPE || token.getType() == TokenTypes.VARIABLE || token.getType() == TokenTypes.FUNCTION)) {
196-
197-
return new LinkGeneratorResult() {
198-
199-
@Override
200-
public int getSourceOffset() {
201-
return offs;
202-
}
203-
204-
@Override
205-
public HyperlinkEvent execute() {
206-
207-
LOG.fine("Open Reference: " + reference);
208-
209-
Base.showReference("Reference/" + reference);
210-
211-
return null;
212-
}
213-
};
214-
}
215-
216-
return null;
217-
}
218-
}
219-
220175

221176
/**
222177
* Handles http hyperlinks.

0 commit comments

Comments
 (0)