Various small bug fixes

This commit is contained in:
crschnick 2023-02-10 21:52:20 +00:00
parent 14d39c23ab
commit 197f5220af
10 changed files with 35 additions and 36 deletions

View file

@ -2,7 +2,7 @@
### Next level remote data workflows for everyone
X-Pipe is a tool for working with remote connections and their data.
X-Pipe is a tool in an early alpha for working with remote connections and their data.
The focus lies on providing:
- An easy remote connection setup and workflow
- Organization of all your connections in one place

View file

@ -101,7 +101,7 @@ List<String> jvmRunArgs = [
def extensionDirList = Arrays.stream(file("$rootDir/ext").list())
.map(l -> project(":$l").buildDir.toString() + "/libs").collect(Collectors.joining(File.pathSeparator));
.map(l -> project(":$l").buildDir.toString() + "/libs_dev").filter {file(it).exists()}.collect(Collectors.joining(File.pathSeparator));
test {
jvmArgs += jvmRunArgs
@ -135,7 +135,7 @@ run {
systemProperty 'io.xpipe.app.writeLogs', "true"
systemProperty 'io.xpipe.app.writeSysOut', "true"
systemProperty 'io.xpipe.app.developerMode', "true"
systemProperty 'io.xpipe.app.logLevel', "debug"
systemProperty 'io.xpipe.app.logLevel', "trace"
systemProperty "io.xpipe.beacon.port", "21724"
// systemProperty "io.xpipe.beacon.printMessages", "true"
systemProperty "io.xpipe.app.extensions", extensionDirList

View file

@ -51,8 +51,8 @@ public class AppLayoutComp extends Comp<CompStructure<BorderPane>> {
// new SideMenuBarComp.Entry(I18n.observable("account"), "mdi2a-account", new StorageLayoutComp()),
new SideMenuBarComp.Entry(I18n.observable("about"), "mdi2p-package-variant", new AboutTabComp())));
if (AppProperties.get().isDeveloperMode()) {
// l.add(new SideMenuBarComp.Entry(I18n.observable("developer"), "mdi2b-book-open-variant", new
// DeveloperTabComp()));
l.add(new SideMenuBarComp.Entry(I18n.observable("developer"), "mdi2b-book-open-variant", new
DeveloperTabComp()));
}
// l.add(new SideMenuBarComp.Entry(I18n.observable("abc"), "mdi2b-book-open-variant", Comp.of(() -> {
// var fi = new FontIcon("mdsal-dvr");

View file

@ -3,8 +3,6 @@ package io.xpipe.app.comp.base;
import com.jfoenix.controls.JFXCheckBox;
import io.xpipe.extension.fxcomps.SimpleComp;
import javafx.beans.property.ListProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.collections.FXCollections;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.Region;
@ -21,7 +19,7 @@ public class ListSelectorComp<T> extends SimpleComp {
List<T> values;
Function<T, String> toString;
ListProperty<T> selected = new SimpleListProperty<>(FXCollections.observableArrayList());
ListProperty<T> selected;
@Override
protected Region createSimple() {
@ -35,7 +33,7 @@ public class ListSelectorComp<T> extends SimpleComp {
selected.remove(v);
}
});
cb.setSelected(true);
cb.setSelected(selected.contains(v));
var l = new Label(toString.apply(v), cb);
vbox.getChildren().add(l);
}

View file

@ -58,7 +58,7 @@ public class AppExtensionManager {
.resolve("ext")
.resolve(name)
.resolve("build")
.resolve("libs");
.resolve("libs_dev");
var layer = loadDirectory(userDir);
return layer.size() > 0 ? layer.get(0) : null;
}

View file

@ -12,8 +12,11 @@ import io.xpipe.extension.I18n;
import io.xpipe.extension.event.ErrorEvent;
import io.xpipe.extension.fxcomps.Comp;
import io.xpipe.extension.fxcomps.SimpleComp;
import javafx.beans.property.ListProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.FXCollections;
import javafx.scene.control.Hyperlink;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
@ -21,19 +24,17 @@ import javafx.scene.layout.*;
import javafx.stage.Stage;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
public class UserReportComp extends SimpleComp {
private final StringProperty text = new SimpleStringProperty();
private final List<Path> includedDiagnostics;
private final ListProperty<Path> includedDiagnostics;
private final ErrorEvent event;
private final Stage stage;
public UserReportComp(ErrorEvent event, Stage stage) {
this.event = event;
this.includedDiagnostics = new ArrayList<>(event.getAttachments());
this.includedDiagnostics = new SimpleListProperty<>(FXCollections.observableArrayList());
this.stage = stage;
}
@ -50,30 +51,13 @@ public class UserReportComp extends SimpleComp {
}
return file.getFileName().toString();
})
}, includedDiagnostics)
.styleClass("attachment-list");
var tp = new TitledPaneComp(I18n.observable("additionalErrorAttachments"), list, 100)
.apply(struc -> struc.get().setExpanded(true))
.apply(s -> AppFont.medium(s.get()))
.styleClass("attachments");
return tp;
//
// var list = FXCollections.observableList(event.getSensitiveDiagnostics());
// return new ListViewComp<>(list, list, null, a -> {
// var label = new Label(a.getFileName().toString());
// var cb = new JFXCheckBox();
// cb.setSelected(includedDiagnostics.contains(a));
// cb.selectedProperty().addListener((c,o,n) -> {
// if (n) {
// includedDiagnostics.add(a);
// } else {
// includedDiagnostics.remove(a);
// }
// });
// var spacer = new Region();
// var c = new HBox(label, spacer, cb);
// HBox.setHgrow(spacer, Priority.ALWAYS);
// return WrapperComp.of(() -> c);
// });
}
@Override

View file

@ -128,7 +128,7 @@ disagree=Disagree
directories=Directories
logFile=Log File
logFiles=Log Files
logFilesAttachment=Log Files (Sensitive information removed)
logFilesAttachment=Log Files
issueReporter=Issue Reporter
openCurrentLogFile=Open current log file
openLogsDirectory=Open logs directory

View file

@ -28,6 +28,6 @@ project.ext {
isFullRelease = System.getenv('RELEASE') != null && Boolean.parseBoolean(System.getenv('RELEASE'))
versionString = file('version').text + (isFullRelease ? '' : '-SNAPSHOT')
canonicalVersionString = file('version').text
buildId = UUID.nameUUIDFromBytes(version.toString().getBytes())
buildId = UUID.nameUUIDFromBytes(versionString.getBytes())
obfuscate = true
}

View file

@ -48,7 +48,10 @@ public class BindingsHelper {
while (true) {
for (ReferenceEntry reference : REFERENCES) {
if (reference.canGc()) {
REFERENCES.remove(reference);
/*
TODO: Figure out why some bindings are garbage collected, even if they shouldn't
*/
// REFERENCES.remove(reference);
}
}
ThreadHelper.sleep(1000);

View file

@ -7,6 +7,20 @@ task copyRuntimeLibs(type: Copy) {
copyRuntimeLibs.dependsOn(addDependenciesModuleInfo)
jar.dependsOn(copyRuntimeLibs)
def dev = tasks.register('createDevOutput', Copy) {
def base = project.name.substring(0, project.name.length() - 1)
def isX = project.name.endsWith("x") && findProject(":$base") != null
var source = "${project.jar.destinationDirectory.get()}"
if (isX) {
from source
into "${project(':' + base).jar.destinationDirectory.get()}_dev"
} else {
from source
into "${project.jar.destinationDirectory.get()}_dev"
}
}
jar.finalizedBy(dev)
tasks.register('createExtOutput', Copy) {
def base = project.name.substring(0, project.name.length() - 1)
def isX = project.name.endsWith("x") && findProject(":$base") != null