Guest User

Untitled

a guest
Sep 15th, 2023
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 15.67 KB | None | 0 0
  1. Index: build.gradle.kts
  2. IDEA additional info:
  3. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  4. <+>UTF-8
  5. ===================================================================
  6. diff --git a/build.gradle.kts b/build.gradle.kts
  7. --- a/build.gradle.kts  (revision 4e99350f67ae2e39a3574efd3cb3549e1e49737b)
  8. +++ b/build.gradle.kts  (date 1694684607657)
  9. @@ -1,8 +1,8 @@
  10.  plugins {
  11.      id("java")
  12. -    id("org.jetbrains.kotlin.jvm") version "1.9.0"
  13. +//    id("org.jetbrains.kotlin.jvm") version "1.9.0"
  14.      id("org.jetbrains.intellij") version "1.15.0"
  15. -    id("org.openjfx.javafxplugin") version "0.0.14"
  16. +//    id("org.openjfx.javafxplugin") version "0.0.14"
  17.      antlr
  18.  }
  19.  
  20. @@ -22,14 +22,14 @@
  21.  // Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
  22.  intellij {
  23.      version.set("2023.2")
  24. -    type.set("IU") // Target IDE Platform
  25. +    type.set("IC") // Target IDE Platform
  26.  
  27.      plugins.set(listOf(/* Plugin Dependencies */))
  28.  }
  29.  
  30. -javafx {
  31. -    modules("javafx.controls", "javafx.graphics", "javafx.swing", "javafx.base")
  32. -}
  33. +//javafx {
  34. +//    modules("javafx.controls", "javafx.graphics", "javafx.swing", "javafx.base")
  35. +//}
  36.  
  37.  tasks {
  38.      // Set the JVM compatibility versions
  39. @@ -37,9 +37,9 @@
  40.          sourceCompatibility = "17"
  41.          targetCompatibility = "17"
  42.      }
  43. -     withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
  44. -         kotlinOptions.jvmTarget = "17"
  45. -     }
  46. +//     withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
  47. +//         kotlinOptions.jvmTarget = "17"
  48. +//     }
  49.  
  50.      patchPluginXml {
  51.          sinceBuild.set("232")
  52. Index: src/main/java/com/example/intellijuvlplugin/FeatureDiagramToolWindow.java
  53. IDEA additional info:
  54. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  55. <+>UTF-8
  56. ===================================================================
  57. diff --git a/src/main/java/com/example/intellijuvlplugin/FeatureDiagramToolWindow.java b/src/main/java/com/example/intellijuvlplugin/FeatureDiagramToolWindow.java
  58. --- a/src/main/java/com/example/intellijuvlplugin/FeatureDiagramToolWindow.java (revision 4e99350f67ae2e39a3574efd3cb3549e1e49737b)
  59. +++ b/src/main/java/com/example/intellijuvlplugin/FeatureDiagramToolWindow.java (date 1694684001302)
  60. @@ -1,110 +1,110 @@
  61. -package com.example.intellijuvlplugin;
  62. -
  63. -import com.intellij.openapi.project.Project;
  64. -import com.intellij.openapi.wm.ToolWindow;
  65. -import com.intellij.openapi.wm.ToolWindowFactory;
  66. -
  67. -import javafx.application.Platform;
  68. -import javafx.embed.swing.JFXPanel;
  69. -import javafx.scene.Group;
  70. -import javafx.scene.Scene;
  71. -import javafx.scene.control.TextInputDialog;
  72. -import javafx.scene.paint.Color;
  73. -import javafx.scene.text.Text;
  74. -import javafx.scene.layout.*;
  75. -import javafx.scene.shape.*;
  76. -import javafx.scene.input.*;
  77. -
  78. -import org.jetbrains.annotations.NotNull;
  79. -
  80. -public class FeatureDiagramToolWindow implements ToolWindowFactory {
  81. -
  82. -    Group root = new Group();
  83. -    @Override
  84. -    public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow)
  85. -    {
  86. -        final JFXPanel fxPanel = new JFXPanel();
  87. -
  88. -        Platform.setImplicitExit(false);
  89. -        Platform.runLater(() -> {
  90. -
  91. -            Scene scene = new Scene(root, Color.WHITE);
  92. -
  93. -            StackPane root_feature = createFeature(300, 50, "Root");
  94. -            StackPane feature1 = createFeature(200, 200, "Feature 1");
  95. -            StackPane feature2 = createFeature(400, 200, "Feature 2");
  96. -            StackPane feature3 = createFeature(50, 350, "Feature 3");
  97. -            StackPane feature4 = createFeature(150, 350, "Feature 4");
  98. -            StackPane feature5 = createFeature(250, 350, "Feature 5");
  99. -            StackPane feature6 = createFeature(350, 400, "Feature 6");
  100. -            StackPane feature7 = createFeature(450, 400, "Feature 7");
  101. -
  102. -            connectFeatures(root_feature, feature1);
  103. -            connectFeatures(root_feature, feature2);
  104. -
  105. -            connectFeatures(feature1, feature3);
  106. -            connectFeatures(feature1, feature4);
  107. -            connectFeatures(feature1, feature5);
  108. -
  109. -            connectFeatures(feature2, feature6);
  110. -            connectFeatures(feature2, feature7);
  111. -
  112. -            fxPanel.setScene(scene);
  113. -        });
  114. -
  115. -        toolWindow.getComponent().getParent().add(fxPanel);
  116. -    }
  117. -
  118. -    public StackPane createFeature(int x, int y, String feature_name)
  119. -    {
  120. -        StackPane stack = new StackPane();
  121. -
  122. -        Text text = new Text(feature_name);
  123. -
  124. -        Rectangle feature = new Rectangle(80, 30);
  125. -        feature.setFill(Color.LIGHTGREY);
  126. -        feature.setStroke(Color.BLACK);
  127. -
  128. -        stack.getChildren().addAll(feature, text);
  129. -
  130. -        stack.setLayoutX(x);
  131. -        stack.setLayoutY(y);
  132. -
  133. -        root.getChildren().add(stack);
  134. -
  135. -        stack.setOnMouseDragged(event -> {
  136. -            if (event.getButton() == MouseButton.PRIMARY) {
  137. -                stack.setLayoutX(event.getSceneX());
  138. -                stack.setLayoutY(event.getSceneY());
  139. -            }
  140. -        });
  141. -
  142. -        stack.setOnMouseClicked(event ->
  143. -        {
  144. -            if (event.getButton() == MouseButton.SECONDARY) {
  145. -                TextInputDialog dialog = new TextInputDialog();
  146. -                dialog.setTitle("Input Dialog");
  147. -                dialog.setHeaderText("Enter a value:");
  148. -                dialog.setContentText("Value:");
  149. -
  150. -                dialog.showAndWait().ifPresent(value -> {
  151. -                    text.setText(value);
  152. -                });
  153. -            }
  154. -        });
  155. -
  156. -        return stack;
  157. -    }
  158. -
  159. -    public void connectFeatures(StackPane feature1, StackPane feature2)
  160. -    {
  161. -        Line line = new Line();
  162. -
  163. -        line.startXProperty().bind(feature1.layoutXProperty().add(feature1.translateXProperty()).add(40));
  164. -        line.startYProperty().bind(feature1.layoutYProperty().add(feature1.translateYProperty()).add(30));
  165. -        line.endXProperty().bind(feature2.layoutXProperty().add(feature2.translateXProperty()).add(40));
  166. -        line.endYProperty().bind(feature2.layoutYProperty().add(feature2.translateYProperty()));
  167. -
  168. -        root.getChildren().add(line);
  169. -    }
  170. -}
  171. +//package com.example.intellijuvlplugin;
  172. +//
  173. +//import com.intellij.openapi.project.Project;
  174. +//import com.intellij.openapi.wm.ToolWindow;
  175. +//import com.intellij.openapi.wm.ToolWindowFactory;
  176. +//
  177. +//import javafx.application.Platform;
  178. +//import javafx.embed.swing.JFXPanel;
  179. +//import javafx.scene.Group;
  180. +//import javafx.scene.Scene;
  181. +//import javafx.scene.control.TextInputDialog;
  182. +//import javafx.scene.paint.Color;
  183. +//import javafx.scene.text.Text;
  184. +//import javafx.scene.layout.*;
  185. +//import javafx.scene.shape.*;
  186. +//import javafx.scene.input.*;
  187. +//
  188. +//import org.jetbrains.annotations.NotNull;
  189. +//
  190. +//public class FeatureDiagramToolWindow implements ToolWindowFactory {
  191. +//
  192. +//    Group root = new Group();
  193. +//    @Override
  194. +//    public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow)
  195. +//    {
  196. +//        final JFXPanel fxPanel = new JFXPanel();
  197. +//
  198. +//        Platform.setImplicitExit(false);
  199. +//        Platform.runLater(() -> {
  200. +//
  201. +//            Scene scene = new Scene(root, Color.WHITE);
  202. +//
  203. +//            StackPane root_feature = createFeature(300, 50, "Root");
  204. +//            StackPane feature1 = createFeature(200, 200, "Feature 1");
  205. +//            StackPane feature2 = createFeature(400, 200, "Feature 2");
  206. +//            StackPane feature3 = createFeature(50, 350, "Feature 3");
  207. +//            StackPane feature4 = createFeature(150, 350, "Feature 4");
  208. +//            StackPane feature5 = createFeature(250, 350, "Feature 5");
  209. +//            StackPane feature6 = createFeature(350, 400, "Feature 6");
  210. +//            StackPane feature7 = createFeature(450, 400, "Feature 7");
  211. +//
  212. +//            connectFeatures(root_feature, feature1);
  213. +//            connectFeatures(root_feature, feature2);
  214. +//
  215. +//            connectFeatures(feature1, feature3);
  216. +//            connectFeatures(feature1, feature4);
  217. +//            connectFeatures(feature1, feature5);
  218. +//
  219. +//            connectFeatures(feature2, feature6);
  220. +//            connectFeatures(feature2, feature7);
  221. +//
  222. +//            fxPanel.setScene(scene);
  223. +//        });
  224. +//
  225. +//        toolWindow.getComponent().getParent().add(fxPanel);
  226. +//    }
  227. +//
  228. +//    public StackPane createFeature(int x, int y, String feature_name)
  229. +//    {
  230. +//        StackPane stack = new StackPane();
  231. +//
  232. +//        Text text = new Text(feature_name);
  233. +//
  234. +//        Rectangle feature = new Rectangle(80, 30);
  235. +//        feature.setFill(Color.LIGHTGREY);
  236. +//        feature.setStroke(Color.BLACK);
  237. +//
  238. +//        stack.getChildren().addAll(feature, text);
  239. +//
  240. +//        stack.setLayoutX(x);
  241. +//        stack.setLayoutY(y);
  242. +//
  243. +//        root.getChildren().add(stack);
  244. +//
  245. +//        stack.setOnMouseDragged(event -> {
  246. +//            if (event.getButton() == MouseButton.PRIMARY) {
  247. +//                stack.setLayoutX(event.getSceneX());
  248. +//                stack.setLayoutY(event.getSceneY());
  249. +//            }
  250. +//        });
  251. +//
  252. +//        stack.setOnMouseClicked(event ->
  253. +//        {
  254. +//            if (event.getButton() == MouseButton.SECONDARY) {
  255. +//                TextInputDialog dialog = new TextInputDialog();
  256. +//                dialog.setTitle("Input Dialog");
  257. +//                dialog.setHeaderText("Enter a value:");
  258. +//                dialog.setContentText("Value:");
  259. +//
  260. +//                dialog.showAndWait().ifPresent(value -> {
  261. +//                    text.setText(value);
  262. +//                });
  263. +//            }
  264. +//        });
  265. +//
  266. +//        return stack;
  267. +//    }
  268. +//
  269. +//    public void connectFeatures(StackPane feature1, StackPane feature2)
  270. +//    {
  271. +//        Line line = new Line();
  272. +//
  273. +//        line.startXProperty().bind(feature1.layoutXProperty().add(feature1.translateXProperty()).add(40));
  274. +//        line.startYProperty().bind(feature1.layoutYProperty().add(feature1.translateYProperty()).add(30));
  275. +//        line.endXProperty().bind(feature2.layoutXProperty().add(feature2.translateXProperty()).add(40));
  276. +//        line.endYProperty().bind(feature2.layoutYProperty().add(feature2.translateYProperty()));
  277. +//
  278. +//        root.getChildren().add(line);
  279. +//    }
  280. +//}
  281. Index: src/main/java/com/example/intellijuvlplugin/UvlLspServerSupportProvider.java
  282. IDEA additional info:
  283. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  284. <+>UTF-8
  285. ===================================================================
  286. diff --git a/src/main/java/com/example/intellijuvlplugin/UvlLspServerSupportProvider.java b/src/main/java/com/example/intellijuvlplugin/UvlLspServerSupportProvider.java
  287. --- a/src/main/java/com/example/intellijuvlplugin/UvlLspServerSupportProvider.java  (revision 4e99350f67ae2e39a3574efd3cb3549e1e49737b)
  288. +++ b/src/main/java/com/example/intellijuvlplugin/UvlLspServerSupportProvider.java  (date 1694683828944)
  289. @@ -1,35 +1,35 @@
  290. -package com.example.intellijuvlplugin;
  291. -
  292. -import com.intellij.execution.configurations.GeneralCommandLine;
  293. -import com.intellij.platform.lsp.api.LspServerSupportProvider;
  294. -import com.intellij.platform.lsp.api.ProjectWideLspServerDescriptor;
  295. -
  296. -import com.intellij.openapi.project.Project;
  297. -import com.intellij.openapi.vfs.VirtualFile;
  298. -import org.jetbrains.annotations.NotNull;
  299. -
  300. -public class UvlLspServerSupportProvider implements LspServerSupportProvider {
  301. -    @Override
  302. -    public void fileOpened(@NotNull Project project, @NotNull VirtualFile file, @NotNull LspServerStarter serverStarter) {
  303. -        if ("uvl".equals(file.getExtension())) {
  304. -            serverStarter.ensureServerStarted(new UvlLspServerDescriptor(project));
  305. -        }
  306. -    }
  307. -}
  308. -
  309. -class UvlLspServerDescriptor extends ProjectWideLspServerDescriptor {
  310. -    public UvlLspServerDescriptor(Project project) {
  311. -        super(project, "UVL");
  312. -    }
  313. -
  314. -    @Override
  315. -    public boolean isSupportedFile(VirtualFile file) {
  316. -        return "uvl".equals(file.getExtension());
  317. -    }
  318. -
  319. -    @Override
  320. -    public GeneralCommandLine createCommandLine() {
  321. -        return new GeneralCommandLine("C:\\Users\\treuf\\Documents\\coding\\IntelliJ\\IntelliJ-UVL-Plugin\\src\\main\\resources\\uvls.exe", "--stdio");
  322. -        //TODO bundle with plugin - make path relative
  323. -    }
  324. -}
  325. +//package com.example.intellijuvlplugin;
  326. +//
  327. +//import com.intellij.execution.configurations.GeneralCommandLine;
  328. +//import com.intellij.platform.lsp.api.LspServerSupportProvider;
  329. +//import com.intellij.platform.lsp.api.ProjectWideLspServerDescriptor;
  330. +//
  331. +//import com.intellij.openapi.project.Project;
  332. +//import com.intellij.openapi.vfs.VirtualFile;
  333. +//import org.jetbrains.annotations.NotNull;
  334. +//
  335. +//public class UvlLspServerSupportProvider implements LspServerSupportProvider {
  336. +//    @Override
  337. +//    public void fileOpened(@NotNull Project project, @NotNull VirtualFile file, @NotNull LspServerStarter serverStarter) {
  338. +//        if ("uvl".equals(file.getExtension())) {
  339. +//            serverStarter.ensureServerStarted(new UvlLspServerDescriptor(project));
  340. +//        }
  341. +//    }
  342. +//}
  343. +//
  344. +//class UvlLspServerDescriptor extends ProjectWideLspServerDescriptor {
  345. +//    public UvlLspServerDescriptor(Project project) {
  346. +//        super(project, "UVL");
  347. +//    }
  348. +//
  349. +//    @Override
  350. +//    public boolean isSupportedFile(VirtualFile file) {
  351. +//        return "uvl".equals(file.getExtension());
  352. +//    }
  353. +//
  354. +//    @Override
  355. +//    public GeneralCommandLine createCommandLine() {
  356. +//        return new GeneralCommandLine("C:\\Users\\treuf\\Documents\\coding\\IntelliJ\\IntelliJ-UVL-Plugin\\src\\main\\resources\\uvls.exe", "--stdio");
  357. +//        //TODO bundle with plugin - make path relative
  358. +//    }
  359. +//}
  360. Index: src/main/resources/META-INF/plugin.xml
  361. IDEA additional info:
  362. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  363. <+>UTF-8
  364. ===================================================================
  365. diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml
  366. --- a/src/main/resources/META-INF/plugin.xml    (revision 4e99350f67ae2e39a3574efd3cb3549e1e49737b)
  367. +++ b/src/main/resources/META-INF/plugin.xml    (date 1694684829657)
  368. @@ -21,7 +21,7 @@
  369.      <!-- Product and plugin compatibility requirements.
  370.           Read more: https://plugins.jetbrains.com/docs/intellij/plugin-compatibility.html -->
  371.      <depends>com.intellij.modules.platform</depends>
  372. -    <depends>com.intellij.modules.ultimate</depends>
  373. +<!--    <depends>com.intellij.modules.ultimate</depends>-->
  374.  
  375.      <!-- Extension points defined by the plugin.
  376.           Read more: https://plugins.jetbrains.com/docs/intellij/plugin-extension-points.html -->
  377. Index: src/main/java/com/example/intellijuvlplugin/language/UVLSyntaxHighlighter.java
  378. IDEA additional info:
  379. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  380. <+>UTF-8
  381. ===================================================================
  382. diff --git a/src/main/java/com/example/intellijuvlplugin/language/UVLSyntaxHighlighter.java b/src/main/java/com/example/intellijuvlplugin/language/UVLSyntaxHighlighter.java
  383. --- a/src/main/java/com/example/intellijuvlplugin/language/UVLSyntaxHighlighter.java    (revision 4e99350f67ae2e39a3574efd3cb3549e1e49737b)
  384. +++ b/src/main/java/com/example/intellijuvlplugin/language/UVLSyntaxHighlighter.java    (date 1694685582672)
  385. @@ -42,9 +42,9 @@
  386.          int ttype = myType.getANTLRTokenType();
  387.          TextAttributesKey attrKey;
  388.          switch ( ttype ) {
  389. -//            case UVLLexer.STRING:
  390. -//                attrKey = STRING;
  391. -//                break;
  392. +            case UVLLexer.STRING:
  393. +                attrKey = STRING;
  394. +                break;
  395.              case UVLLexer.COMMENT:
  396.                  attrKey = COMMENT;
  397.                  break;
  398.  
Add Comment
Please, Sign In to add comment