Skip to content

Commit 9cfdc7e

Browse files
committed
Update code to the latest Idea SDK
1 parent 4244879 commit 9cfdc7e

File tree

10 files changed

+15
-41
lines changed

10 files changed

+15
-41
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ allprojects {
2424
mavenCentral()
2525
mavenLocal()
2626
jcenter()
27-
maven { url 'http://dl.bintray.com/jetbrains/intellij-plugin-service' }
27+
maven { url 'https://www.jetbrains.com/intellij-repository/releases/' }
2828
}
2929

3030
apply plugin: 'java'

database/opencypher/src/main/java/com/neueda/jetbrains/plugin/graphdb/database/opencypher/gremlin/OpenCypherGremlinDatabase.java

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public OpenCypherGremlinDatabase(OpenCypherGremlinConfiguration configuration) {
5959
.serializer(configuration.getSerializer())
6060
.enableSsl(configuration.getSSL())
6161
.port(uri.getPort())
62+
.maxContentLength(65536*10)
6263
.create();
6364

6465
flavor = configuration.getFlavor();

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version=3.0.4
22

33
# Intellij SDK
4-
intellijSdkVersion=2019.3.3
4+
intellijSdkVersion=2021.3.1
55

66
# Versions
77
versionJunit=4.12

language/cypher/src/main/java/com/neueda/jetbrains/plugin/graphdb/language/cypher/editor/CypherParameterInfoHandler.java

+2-30
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.neueda.jetbrains.plugin.graphdb.language.cypher.editor;
22

3-
import com.intellij.codeInsight.lookup.LookupElement;
43
import com.intellij.lang.parameterInfo.*;
54
import com.intellij.psi.PsiElement;
65
import com.intellij.psi.tree.IElementType;
@@ -42,13 +41,13 @@ public IElementType getActualParametersRBraceType() {
4241

4342
@NotNull
4443
@Override
45-
public Set<Class> getArgumentListAllowedParentClasses() {
44+
public Set<Class<?>> getArgumentListAllowedParentClasses() {
4645
return ContainerUtil.newHashSet();
4746
}
4847

4948
@NotNull
5049
@Override
51-
public Set<? extends Class> getArgListStopSearchClasses() {
50+
public Set<? extends Class<?>> getArgListStopSearchClasses() {
5251
return ContainerUtil.newHashSet();
5352
}
5453

@@ -58,22 +57,6 @@ public Class<CypherInvocation> getArgumentListClass() {
5857
return CypherInvocation.class;
5958
}
6059

61-
@Override
62-
public boolean couldShowInLookup() {
63-
return true;
64-
}
65-
66-
@Nullable
67-
@Override
68-
public Object[] getParametersForLookup(LookupElement item, ParameterInfoContext context) {
69-
return ArrayUtil.EMPTY_OBJECT_ARRAY;
70-
}
71-
72-
@Nullable
73-
@Override
74-
public Object[] getParametersForDocumentation(CypherInvocation p, ParameterInfoContext context) {
75-
return ArrayUtil.EMPTY_OBJECT_ARRAY;
76-
}
7760

7861
@Nullable
7962
@Override
@@ -104,17 +87,6 @@ public void updateParameterInfo(@NotNull CypherInvocation o, @NotNull UpdatePara
10487
CypherTypes.OP_COMMA));
10588
}
10689

107-
@Nullable
108-
@Override
109-
public String getParameterCloseChars() {
110-
return ",(";
111-
}
112-
113-
@Override
114-
public boolean tracksParameterIndex() {
115-
return true;
116-
}
117-
11890

11991
@Override
12092
public void updateUI(CypherInvocation ci, @NotNull ParameterInfoUIContext context) {

ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/actions/execute/ExecuteQueryActionPromoter.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.intellij.openapi.actionSystem.DataContext;
66
import com.intellij.openapi.actionSystem.PlatformDataKeys;
77
import com.intellij.psi.PsiFile;
8+
import org.jetbrains.annotations.NotNull;
89

910
import java.util.ArrayList;
1011
import java.util.Collections;
@@ -15,7 +16,7 @@
1516
public class ExecuteQueryActionPromoter implements ActionPromoter {
1617

1718
@Override
18-
public List<AnAction> promote(List<AnAction> actions, DataContext context) {
19+
public List<AnAction> promote(@NotNull List<? extends AnAction> actions, @NotNull DataContext context) {
1920
PsiFile psiFile = PlatformDataKeys.PSI_FILE.getData(context);
2021
if (psiFile != null) {
2122
String languageId = psiFile.getLanguage().getID();
@@ -27,7 +28,7 @@ public List<AnAction> promote(List<AnAction> actions, DataContext context) {
2728
return Collections.emptyList();
2829
}
2930

30-
private ArrayList<AnAction> checkForExecuteQueryAction(List<AnAction> actions) {
31+
private ArrayList<AnAction> checkForExecuteQueryAction(List<? extends AnAction> actions) {
3132
ArrayList<AnAction> selectedActions = new ArrayList<>();
3233

3334
for (AnAction action : actions) {

ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/component/highlighter/QueryHighlighterComponentImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void initComponent() {
2727

2828
@Override
2929
public void disposeComponent() {
30-
EditorFactory editorFactory = ApplicationManager.getApplication().getComponent(EditorFactory.class);
30+
EditorFactory editorFactory = ApplicationManager.getApplication().getService(EditorFactory.class);
3131
if (queryHighlighterCaretListener != null) {
3232
editorFactory.getEventMulticaster().removeCaretListener(queryHighlighterCaretListener);
3333
}

ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/component/linemarker/CypherLineMarkerProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ private Optional<DataContext> getDataContext() {
8181
}
8282

8383
@Override
84-
public void collectSlowLineMarkers(@NotNull List<PsiElement> elements, @NotNull Collection<LineMarkerInfo> result) {
84+
public void collectSlowLineMarkers(@NotNull List<? extends PsiElement> elements, @NotNull Collection<? super LineMarkerInfo<?>> result) {
8585
// Method intentionally left empty.
8686
}
8787
}

ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/ui/console/log/LogPanel.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ private void showPopup(String title, String details, Exception exception) {
180180
JTextArea exceptionDetails = new JTextArea();
181181
exceptionDetails.setLineWrap(false);
182182
exceptionDetails.append(details);
183-
JLabel jLabel = new JLabel(exception.getMessage(), AllIcons.Process.State.RedExcl, JLabel.LEFT);
183+
JLabel jLabel = new JLabel(exception.getMessage(), AllIcons.General.ExclMark, JLabel.LEFT);
184184

185185
JBScrollPane scrollPane = new JBScrollPane(exceptionDetails);
186186
scrollPane.setPreferredSize(new Dimension(-1, HEIGHT));

ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/ui/console/params/ParametersPanel.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ private void releaseFileSpecificEditor(VirtualFile oldFile) {
168168
private String getTabTitle(VirtualFile file) {
169169
Window window = WindowManagerEx.getInstanceEx().getMostRecentFocusedWindow();
170170
EditorWindow editorWindow = FileEditorManagerEx.getInstanceEx(project).getSplittersFor(window).getCurrentWindow();
171-
return EditorTabPresentationUtil.getEditorTabTitle(project, file, editorWindow);
171+
return EditorTabPresentationUtil.getEditorTabTitle(project, file);
172172
}
173173

174174
private void setInitialContent(Document document) {

ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/ui/datasource/interactions/DataSourceDialog.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void validationPopup() {
5353
ValidationInfo validationInfo = doValidate();
5454
if (validationInfo != null) {
5555
JLabel connectionFailed = new JLabel("Connection failed: " + validationInfo.message,
56-
AllIcons.Process.State.RedExcl, JLabel.LEFT);
56+
AllIcons.General.ExclMark, JLabel.LEFT);
5757
popupPanel.add(connectionFailed, BorderLayout.CENTER);
5858
createPopup(popupPanel, getContentPanel());
5959
} else {
@@ -107,7 +107,7 @@ private void connectionSuccessful(
107107
JPanel popupPanel,
108108
JComponent contentPanel) {
109109
hideLoading();
110-
JLabel connectionSuccessful = new JLabel("Connection successful!", AllIcons.Process.State.GreenOK, JLabel.LEFT);
110+
JLabel connectionSuccessful = new JLabel("Connection successful!", AllIcons.General.InspectionsOK, JLabel.LEFT);
111111
popupPanel.add(connectionSuccessful, BorderLayout.CENTER);
112112

113113
createPopup(popupPanel, contentPanel);
@@ -120,7 +120,7 @@ private void connectionFailed(
120120
hideLoading();
121121

122122
JLabel connectionFailed = new JLabel("Connection failed: " +
123-
exception.getMessage(), AllIcons.Process.State.RedExcl, JLabel.LEFT);
123+
exception.getMessage(), AllIcons.General.ExclMark, JLabel.LEFT);
124124

125125
JTextArea exceptionCauses = new JTextArea();
126126
exceptionCauses.setLineWrap(false);

0 commit comments

Comments
 (0)