Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: build.gradle.kts
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/build.gradle.kts b/build.gradle.kts
- --- a/build.gradle.kts (revision 4e99350f67ae2e39a3574efd3cb3549e1e49737b)
- +++ b/build.gradle.kts (date 1694684607657)
- @@ -1,8 +1,8 @@
- plugins {
- id("java")
- - id("org.jetbrains.kotlin.jvm") version "1.9.0"
- +// id("org.jetbrains.kotlin.jvm") version "1.9.0"
- id("org.jetbrains.intellij") version "1.15.0"
- - id("org.openjfx.javafxplugin") version "0.0.14"
- +// id("org.openjfx.javafxplugin") version "0.0.14"
- antlr
- }
- @@ -22,14 +22,14 @@
- // Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
- intellij {
- version.set("2023.2")
- - type.set("IU") // Target IDE Platform
- + type.set("IC") // Target IDE Platform
- plugins.set(listOf(/* Plugin Dependencies */))
- }
- -javafx {
- - modules("javafx.controls", "javafx.graphics", "javafx.swing", "javafx.base")
- -}
- +//javafx {
- +// modules("javafx.controls", "javafx.graphics", "javafx.swing", "javafx.base")
- +//}
- tasks {
- // Set the JVM compatibility versions
- @@ -37,9 +37,9 @@
- sourceCompatibility = "17"
- targetCompatibility = "17"
- }
- - withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
- - kotlinOptions.jvmTarget = "17"
- - }
- +// withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
- +// kotlinOptions.jvmTarget = "17"
- +// }
- patchPluginXml {
- sinceBuild.set("232")
- Index: src/main/java/com/example/intellijuvlplugin/FeatureDiagramToolWindow.java
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/src/main/java/com/example/intellijuvlplugin/FeatureDiagramToolWindow.java b/src/main/java/com/example/intellijuvlplugin/FeatureDiagramToolWindow.java
- --- a/src/main/java/com/example/intellijuvlplugin/FeatureDiagramToolWindow.java (revision 4e99350f67ae2e39a3574efd3cb3549e1e49737b)
- +++ b/src/main/java/com/example/intellijuvlplugin/FeatureDiagramToolWindow.java (date 1694684001302)
- @@ -1,110 +1,110 @@
- -package com.example.intellijuvlplugin;
- -
- -import com.intellij.openapi.project.Project;
- -import com.intellij.openapi.wm.ToolWindow;
- -import com.intellij.openapi.wm.ToolWindowFactory;
- -
- -import javafx.application.Platform;
- -import javafx.embed.swing.JFXPanel;
- -import javafx.scene.Group;
- -import javafx.scene.Scene;
- -import javafx.scene.control.TextInputDialog;
- -import javafx.scene.paint.Color;
- -import javafx.scene.text.Text;
- -import javafx.scene.layout.*;
- -import javafx.scene.shape.*;
- -import javafx.scene.input.*;
- -
- -import org.jetbrains.annotations.NotNull;
- -
- -public class FeatureDiagramToolWindow implements ToolWindowFactory {
- -
- - Group root = new Group();
- - @Override
- - public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow)
- - {
- - final JFXPanel fxPanel = new JFXPanel();
- -
- - Platform.setImplicitExit(false);
- - Platform.runLater(() -> {
- -
- - Scene scene = new Scene(root, Color.WHITE);
- -
- - StackPane root_feature = createFeature(300, 50, "Root");
- - StackPane feature1 = createFeature(200, 200, "Feature 1");
- - StackPane feature2 = createFeature(400, 200, "Feature 2");
- - StackPane feature3 = createFeature(50, 350, "Feature 3");
- - StackPane feature4 = createFeature(150, 350, "Feature 4");
- - StackPane feature5 = createFeature(250, 350, "Feature 5");
- - StackPane feature6 = createFeature(350, 400, "Feature 6");
- - StackPane feature7 = createFeature(450, 400, "Feature 7");
- -
- - connectFeatures(root_feature, feature1);
- - connectFeatures(root_feature, feature2);
- -
- - connectFeatures(feature1, feature3);
- - connectFeatures(feature1, feature4);
- - connectFeatures(feature1, feature5);
- -
- - connectFeatures(feature2, feature6);
- - connectFeatures(feature2, feature7);
- -
- - fxPanel.setScene(scene);
- - });
- -
- - toolWindow.getComponent().getParent().add(fxPanel);
- - }
- -
- - public StackPane createFeature(int x, int y, String feature_name)
- - {
- - StackPane stack = new StackPane();
- -
- - Text text = new Text(feature_name);
- -
- - Rectangle feature = new Rectangle(80, 30);
- - feature.setFill(Color.LIGHTGREY);
- - feature.setStroke(Color.BLACK);
- -
- - stack.getChildren().addAll(feature, text);
- -
- - stack.setLayoutX(x);
- - stack.setLayoutY(y);
- -
- - root.getChildren().add(stack);
- -
- - stack.setOnMouseDragged(event -> {
- - if (event.getButton() == MouseButton.PRIMARY) {
- - stack.setLayoutX(event.getSceneX());
- - stack.setLayoutY(event.getSceneY());
- - }
- - });
- -
- - stack.setOnMouseClicked(event ->
- - {
- - if (event.getButton() == MouseButton.SECONDARY) {
- - TextInputDialog dialog = new TextInputDialog();
- - dialog.setTitle("Input Dialog");
- - dialog.setHeaderText("Enter a value:");
- - dialog.setContentText("Value:");
- -
- - dialog.showAndWait().ifPresent(value -> {
- - text.setText(value);
- - });
- - }
- - });
- -
- - return stack;
- - }
- -
- - public void connectFeatures(StackPane feature1, StackPane feature2)
- - {
- - Line line = new Line();
- -
- - line.startXProperty().bind(feature1.layoutXProperty().add(feature1.translateXProperty()).add(40));
- - line.startYProperty().bind(feature1.layoutYProperty().add(feature1.translateYProperty()).add(30));
- - line.endXProperty().bind(feature2.layoutXProperty().add(feature2.translateXProperty()).add(40));
- - line.endYProperty().bind(feature2.layoutYProperty().add(feature2.translateYProperty()));
- -
- - root.getChildren().add(line);
- - }
- -}
- +//package com.example.intellijuvlplugin;
- +//
- +//import com.intellij.openapi.project.Project;
- +//import com.intellij.openapi.wm.ToolWindow;
- +//import com.intellij.openapi.wm.ToolWindowFactory;
- +//
- +//import javafx.application.Platform;
- +//import javafx.embed.swing.JFXPanel;
- +//import javafx.scene.Group;
- +//import javafx.scene.Scene;
- +//import javafx.scene.control.TextInputDialog;
- +//import javafx.scene.paint.Color;
- +//import javafx.scene.text.Text;
- +//import javafx.scene.layout.*;
- +//import javafx.scene.shape.*;
- +//import javafx.scene.input.*;
- +//
- +//import org.jetbrains.annotations.NotNull;
- +//
- +//public class FeatureDiagramToolWindow implements ToolWindowFactory {
- +//
- +// Group root = new Group();
- +// @Override
- +// public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow)
- +// {
- +// final JFXPanel fxPanel = new JFXPanel();
- +//
- +// Platform.setImplicitExit(false);
- +// Platform.runLater(() -> {
- +//
- +// Scene scene = new Scene(root, Color.WHITE);
- +//
- +// StackPane root_feature = createFeature(300, 50, "Root");
- +// StackPane feature1 = createFeature(200, 200, "Feature 1");
- +// StackPane feature2 = createFeature(400, 200, "Feature 2");
- +// StackPane feature3 = createFeature(50, 350, "Feature 3");
- +// StackPane feature4 = createFeature(150, 350, "Feature 4");
- +// StackPane feature5 = createFeature(250, 350, "Feature 5");
- +// StackPane feature6 = createFeature(350, 400, "Feature 6");
- +// StackPane feature7 = createFeature(450, 400, "Feature 7");
- +//
- +// connectFeatures(root_feature, feature1);
- +// connectFeatures(root_feature, feature2);
- +//
- +// connectFeatures(feature1, feature3);
- +// connectFeatures(feature1, feature4);
- +// connectFeatures(feature1, feature5);
- +//
- +// connectFeatures(feature2, feature6);
- +// connectFeatures(feature2, feature7);
- +//
- +// fxPanel.setScene(scene);
- +// });
- +//
- +// toolWindow.getComponent().getParent().add(fxPanel);
- +// }
- +//
- +// public StackPane createFeature(int x, int y, String feature_name)
- +// {
- +// StackPane stack = new StackPane();
- +//
- +// Text text = new Text(feature_name);
- +//
- +// Rectangle feature = new Rectangle(80, 30);
- +// feature.setFill(Color.LIGHTGREY);
- +// feature.setStroke(Color.BLACK);
- +//
- +// stack.getChildren().addAll(feature, text);
- +//
- +// stack.setLayoutX(x);
- +// stack.setLayoutY(y);
- +//
- +// root.getChildren().add(stack);
- +//
- +// stack.setOnMouseDragged(event -> {
- +// if (event.getButton() == MouseButton.PRIMARY) {
- +// stack.setLayoutX(event.getSceneX());
- +// stack.setLayoutY(event.getSceneY());
- +// }
- +// });
- +//
- +// stack.setOnMouseClicked(event ->
- +// {
- +// if (event.getButton() == MouseButton.SECONDARY) {
- +// TextInputDialog dialog = new TextInputDialog();
- +// dialog.setTitle("Input Dialog");
- +// dialog.setHeaderText("Enter a value:");
- +// dialog.setContentText("Value:");
- +//
- +// dialog.showAndWait().ifPresent(value -> {
- +// text.setText(value);
- +// });
- +// }
- +// });
- +//
- +// return stack;
- +// }
- +//
- +// public void connectFeatures(StackPane feature1, StackPane feature2)
- +// {
- +// Line line = new Line();
- +//
- +// line.startXProperty().bind(feature1.layoutXProperty().add(feature1.translateXProperty()).add(40));
- +// line.startYProperty().bind(feature1.layoutYProperty().add(feature1.translateYProperty()).add(30));
- +// line.endXProperty().bind(feature2.layoutXProperty().add(feature2.translateXProperty()).add(40));
- +// line.endYProperty().bind(feature2.layoutYProperty().add(feature2.translateYProperty()));
- +//
- +// root.getChildren().add(line);
- +// }
- +//}
- Index: src/main/java/com/example/intellijuvlplugin/UvlLspServerSupportProvider.java
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/src/main/java/com/example/intellijuvlplugin/UvlLspServerSupportProvider.java b/src/main/java/com/example/intellijuvlplugin/UvlLspServerSupportProvider.java
- --- a/src/main/java/com/example/intellijuvlplugin/UvlLspServerSupportProvider.java (revision 4e99350f67ae2e39a3574efd3cb3549e1e49737b)
- +++ b/src/main/java/com/example/intellijuvlplugin/UvlLspServerSupportProvider.java (date 1694683828944)
- @@ -1,35 +1,35 @@
- -package com.example.intellijuvlplugin;
- -
- -import com.intellij.execution.configurations.GeneralCommandLine;
- -import com.intellij.platform.lsp.api.LspServerSupportProvider;
- -import com.intellij.platform.lsp.api.ProjectWideLspServerDescriptor;
- -
- -import com.intellij.openapi.project.Project;
- -import com.intellij.openapi.vfs.VirtualFile;
- -import org.jetbrains.annotations.NotNull;
- -
- -public class UvlLspServerSupportProvider implements LspServerSupportProvider {
- - @Override
- - public void fileOpened(@NotNull Project project, @NotNull VirtualFile file, @NotNull LspServerStarter serverStarter) {
- - if ("uvl".equals(file.getExtension())) {
- - serverStarter.ensureServerStarted(new UvlLspServerDescriptor(project));
- - }
- - }
- -}
- -
- -class UvlLspServerDescriptor extends ProjectWideLspServerDescriptor {
- - public UvlLspServerDescriptor(Project project) {
- - super(project, "UVL");
- - }
- -
- - @Override
- - public boolean isSupportedFile(VirtualFile file) {
- - return "uvl".equals(file.getExtension());
- - }
- -
- - @Override
- - public GeneralCommandLine createCommandLine() {
- - return new GeneralCommandLine("C:\\Users\\treuf\\Documents\\coding\\IntelliJ\\IntelliJ-UVL-Plugin\\src\\main\\resources\\uvls.exe", "--stdio");
- - //TODO bundle with plugin - make path relative
- - }
- -}
- +//package com.example.intellijuvlplugin;
- +//
- +//import com.intellij.execution.configurations.GeneralCommandLine;
- +//import com.intellij.platform.lsp.api.LspServerSupportProvider;
- +//import com.intellij.platform.lsp.api.ProjectWideLspServerDescriptor;
- +//
- +//import com.intellij.openapi.project.Project;
- +//import com.intellij.openapi.vfs.VirtualFile;
- +//import org.jetbrains.annotations.NotNull;
- +//
- +//public class UvlLspServerSupportProvider implements LspServerSupportProvider {
- +// @Override
- +// public void fileOpened(@NotNull Project project, @NotNull VirtualFile file, @NotNull LspServerStarter serverStarter) {
- +// if ("uvl".equals(file.getExtension())) {
- +// serverStarter.ensureServerStarted(new UvlLspServerDescriptor(project));
- +// }
- +// }
- +//}
- +//
- +//class UvlLspServerDescriptor extends ProjectWideLspServerDescriptor {
- +// public UvlLspServerDescriptor(Project project) {
- +// super(project, "UVL");
- +// }
- +//
- +// @Override
- +// public boolean isSupportedFile(VirtualFile file) {
- +// return "uvl".equals(file.getExtension());
- +// }
- +//
- +// @Override
- +// public GeneralCommandLine createCommandLine() {
- +// return new GeneralCommandLine("C:\\Users\\treuf\\Documents\\coding\\IntelliJ\\IntelliJ-UVL-Plugin\\src\\main\\resources\\uvls.exe", "--stdio");
- +// //TODO bundle with plugin - make path relative
- +// }
- +//}
- Index: src/main/resources/META-INF/plugin.xml
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml
- --- a/src/main/resources/META-INF/plugin.xml (revision 4e99350f67ae2e39a3574efd3cb3549e1e49737b)
- +++ b/src/main/resources/META-INF/plugin.xml (date 1694684829657)
- @@ -21,7 +21,7 @@
- <!-- Product and plugin compatibility requirements.
- Read more: https://plugins.jetbrains.com/docs/intellij/plugin-compatibility.html -->
- <depends>com.intellij.modules.platform</depends>
- - <depends>com.intellij.modules.ultimate</depends>
- +<!-- <depends>com.intellij.modules.ultimate</depends>-->
- <!-- Extension points defined by the plugin.
- Read more: https://plugins.jetbrains.com/docs/intellij/plugin-extension-points.html -->
- Index: src/main/java/com/example/intellijuvlplugin/language/UVLSyntaxHighlighter.java
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/src/main/java/com/example/intellijuvlplugin/language/UVLSyntaxHighlighter.java b/src/main/java/com/example/intellijuvlplugin/language/UVLSyntaxHighlighter.java
- --- a/src/main/java/com/example/intellijuvlplugin/language/UVLSyntaxHighlighter.java (revision 4e99350f67ae2e39a3574efd3cb3549e1e49737b)
- +++ b/src/main/java/com/example/intellijuvlplugin/language/UVLSyntaxHighlighter.java (date 1694685582672)
- @@ -42,9 +42,9 @@
- int ttype = myType.getANTLRTokenType();
- TextAttributesKey attrKey;
- switch ( ttype ) {
- -// case UVLLexer.STRING:
- -// attrKey = STRING;
- -// break;
- + case UVLLexer.STRING:
- + attrKey = STRING;
- + break;
- case UVLLexer.COMMENT:
- attrKey = COMMENT;
- break;
Add Comment
Please, Sign In to add comment