Skip to content

Commit

Permalink
url opening error on windows fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ozkanpakdil committed Jun 13, 2024
1 parent 7298abe commit 6069ceb
Show file tree
Hide file tree
Showing 5 changed files with 152 additions and 1,728 deletions.
8 changes: 5 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<artifactId>swaggerific</artifactId>
<version>0.0.2-SNAPSHOT</version>
<name>swaggerific</name>

<description>An alternative to famous REST client Postman, Swaggerific is written in java and fully open source.</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>5.9.2</junit.version>
Expand Down Expand Up @@ -185,7 +185,7 @@
<dependency>
<groupId>io.github.ozkanpakdil</groupId>
<artifactId>dockfx</artifactId>
<version>0.1.2</version>
<version>0.1.3</version>
</dependency>

<dependency>
Expand All @@ -203,7 +203,7 @@
<dependency>
<groupId>org.testfx</groupId>
<artifactId>testfx-junit5</artifactId>
<version>4.0.17</version>
<version>4.0.18</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -307,6 +307,8 @@
</attachList>
<releaseConfiguration>
<skipSigning>true</skipSigning>
<vendor>${groupId}</vendor>
<description>${description}</description>
</releaseConfiguration>
<!--<runtimeArgs>
<arg>&#45;&#45;add-modules=javafx.controls,javafx.web</arg>
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/com/mascix/swaggerific/ui/MainController.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
public class MainController implements Initializable {

//TODO this can go to Preferences.userNodeForPackage in the future
public static final String SESSION = "session.bin";
String SESSION = System.getProperty("user.home") + "/.swaggerific/session.bin";
public TabPane tabRequests;
@FXML
VBox mainBox;
Expand Down Expand Up @@ -91,6 +91,10 @@ public class MainController implements Initializable {
@SneakyThrows
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
if (System.getProperty("user.dir").toLowerCase().contains("project"))
SESSION = "session.bin";
else
SESSION = System.getProperty("user.home") + "/.swaggerific/session.bin";
treePaths.getSelectionModel()
.selectedItemProperty()
.addListener((ChangeListener<TreeItem<String>>) (observable, oldValue, newValue) -> {
Expand Down
180 changes: 9 additions & 171 deletions src/main/resources/META-INF/native-image/jni-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,92 +2,21 @@
{
"name":"[Lcom.sun.glass.ui.Screen;"
},
{
"name":"[Lcom.sun.javafx.font.FontConfigManager$FontConfigFont;"
},
{
"name":"com.sun.glass.ui.Application"
},
{
"name":"com.sun.glass.ui.Clipboard",
"methods":[{"name":"contentChanged","parameterTypes":[] }]
},
{
"name":"com.sun.glass.ui.Cursor",
"fields":[{"name":"ptr"}],
"methods":[
{"name":"getNativeCursor","parameterTypes":[] },
{"name":"getType","parameterTypes":[] }
]
},
{
"name":"com.sun.glass.ui.Pixels",
"methods":[{"name":"attachData","parameterTypes":["long"] }]
},
{
"name":"com.sun.glass.ui.Screen",
"methods":[
{"name":"<init>","parameterTypes":["long","int","int","int","int","int","int","int","int","int","int","int","int","int","int","int","float","float","float","float"] },
{"name":"notifySettingsChanged","parameterTypes":[] }
]
"methods":[{"name":"<init>","parameterTypes":["long","int","int","int","int","int","int","int","int","int","int","int","int","int","int","int","float","float","float","float"] }]
},
{
"name":"com.sun.glass.ui.Size",
"methods":[{"name":"<init>","parameterTypes":["int","int"] }]
},
{
"name":"com.sun.glass.ui.View",
"fields":[{"name":"ptr"}],
"methods":[
{"name":"notifyDragDrop","parameterTypes":["int","int","int","int","int"] },
{"name":"notifyDragEnter","parameterTypes":["int","int","int","int","int"] },
{"name":"notifyDragLeave","parameterTypes":[] },
{"name":"notifyDragOver","parameterTypes":["int","int","int","int","int"] },
{"name":"notifyInputMethod","parameterTypes":["java.lang.String","int[]","int[]","byte[]","int","int","int"] },
{"name":"notifyKey","parameterTypes":["int","int","char[]","int"] },
{"name":"notifyMenu","parameterTypes":["int","int","int","int","boolean"] },
{"name":"notifyMouse","parameterTypes":["int","int","int","int","int","int","int","boolean","boolean"] },
{"name":"notifyRepaint","parameterTypes":["int","int","int","int"] },
{"name":"notifyResize","parameterTypes":["int","int"] },
{"name":"notifyScroll","parameterTypes":["int","int","int","int","double","double","int","int","int","int","int","double","double"] },
{"name":"notifyView","parameterTypes":["int"] }
]
},
{
"name":"com.sun.glass.ui.Window",
"fields":[{"name":"ptr"}],
"methods":[
{"name":"isEnabled","parameterTypes":[] },
{"name":"notifyClose","parameterTypes":[] },
{"name":"notifyDelegatePtr","parameterTypes":["long"] },
{"name":"notifyDestroy","parameterTypes":[] },
{"name":"notifyFocus","parameterTypes":["int"] },
{"name":"notifyFocusDisabled","parameterTypes":[] },
{"name":"notifyFocusUngrab","parameterTypes":[] },
{"name":"notifyLevelChanged","parameterTypes":["int"] },
{"name":"notifyMove","parameterTypes":["int","int"] },
{"name":"notifyMoveToAnotherScreen","parameterTypes":["com.sun.glass.ui.Screen"] },
{"name":"notifyResize","parameterTypes":["int","int","int"] }
]
},
{
"name":"com.sun.javafx.font.FontConfigManager$FcCompFont",
"fields":[
{"name":"allFonts"},
{"name":"fcName"},
{"name":"firstFont"}
]
},
{
"name":"com.sun.javafx.font.FontConfigManager$FontConfigFont",
"fields":[
{"name":"familyName"},
{"name":"fontFile"},
{"name":"fullName"},
{"name":"styleStr"}
],
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.sun.javafx.font.directwrite.D2D1_COLOR_F",
"fields":[
Expand Down Expand Up @@ -165,18 +94,6 @@
],
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.sun.javafx.font.directwrite.DWRITE_MATRIX",
"fields":[
{"name":"dx"},
{"name":"dy"},
{"name":"m11"},
{"name":"m12"},
{"name":"m21"},
{"name":"m22"}
],
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.sun.javafx.font.directwrite.RECT",
"fields":[
Expand All @@ -187,47 +104,6 @@
],
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.sun.javafx.font.freetype.FT_Bitmap",
"fields":[
{"name":"buffer"},
{"name":"num_grays"},
{"name":"palette"},
{"name":"palette_mode"},
{"name":"pitch"},
{"name":"pixel_mode"},
{"name":"rows"},
{"name":"width"}
]
},
{
"name":"com.sun.javafx.font.freetype.FT_GlyphSlotRec",
"fields":[
{"name":"advance_x"},
{"name":"advance_y"},
{"name":"bitmap"},
{"name":"bitmap_left"},
{"name":"bitmap_top"},
{"name":"format"},
{"name":"linearHoriAdvance"},
{"name":"linearVertAdvance"},
{"name":"metrics"}
],
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.sun.javafx.font.freetype.FT_Glyph_Metrics",
"fields":[
{"name":"height"},
{"name":"horiAdvance"},
{"name":"horiBearingX"},
{"name":"horiBearingY"},
{"name":"vertAdvance"},
{"name":"vertBearingX"},
{"name":"vertBearingY"},
{"name":"width"}
]
},
{
"name":"com.sun.javafx.iio.common.ImageLoaderImpl",
"methods":[{"name":"emitWarning","parameterTypes":["java.lang.String"] }]
Expand All @@ -249,6 +125,13 @@
{"name":"verbose"}
]
},
{
"name":"com.sun.webkit.CursorManager",
"methods":[
{"name":"getCursorManager","parameterTypes":[] },
{"name":"getPredefinedCursorID","parameterTypes":["int"] }
]
},
{
"name":"com.sun.webkit.FileSystem"
},
Expand Down Expand Up @@ -390,10 +273,6 @@
{"name":"skip","parameterTypes":["long"] }
]
},
{
"name":"java.lang.Boolean",
"methods":[{"name":"getBoolean","parameterTypes":["java.lang.String"] }]
},
{
"name":"java.lang.Class",
"methods":[{"name":"forName","parameterTypes":["java.lang.String","boolean","java.lang.ClassLoader"] }]
Expand All @@ -405,10 +284,6 @@
{"name":"loadClass","parameterTypes":["java.lang.String"] }
]
},
{
"name":"java.lang.Iterable",
"methods":[{"name":"iterator","parameterTypes":[] }]
},
{
"name":"java.lang.Runnable",
"methods":[{"name":"run","parameterTypes":[] }]
Expand All @@ -417,57 +292,20 @@
"name":"java.lang.String",
"methods":[{"name":"toLowerCase","parameterTypes":["java.util.Locale"] }]
},
{
"name":"java.nio.ByteBuffer",
"methods":[
{"name":"array","parameterTypes":[] },
{"name":"wrap","parameterTypes":["byte[]"] }
]
},
{
"name":"java.util.ArrayList",
"methods":[
{"name":"<init>","parameterTypes":[] },
{"name":"<init>","parameterTypes":["int"] },
{"name":"add","parameterTypes":["java.lang.Object"] },
{"name":"get","parameterTypes":["int"] }
{"name":"add","parameterTypes":["java.lang.Object"] }
]
},
{
"name":"java.util.HashMap",
"methods":[
{"name":"containsKey","parameterTypes":["java.lang.Object"] },
{"name":"get","parameterTypes":["java.lang.Object"] },
{"name":"put","parameterTypes":["java.lang.Object","java.lang.Object"] }
]
},
{
"name":"java.util.HashSet",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"java.util.Iterator",
"methods":[
{"name":"hasNext","parameterTypes":[] },
{"name":"next","parameterTypes":[] }
]
},
{
"name":"java.util.Map",
"methods":[
{"name":"containsKey","parameterTypes":["java.lang.Object"] },
{"name":"get","parameterTypes":["java.lang.Object"] },
{"name":"keySet","parameterTypes":[] }
]
},
{
"name":"java.util.Set",
"methods":[
{"name":"add","parameterTypes":["java.lang.Object"] },
{"name":"size","parameterTypes":[] },
{"name":"toArray","parameterTypes":["java.lang.Object[]"] }
]
},
{
"name":"jdk.internal.loader.ClassLoaders$PlatformClassLoader"
},
Expand Down
Loading

0 comments on commit 6069ceb

Please sign in to comment.