Defer Plugin Automatic Loading/Opening on Eclipse startup - eclipse-plugin

I created a new plugin under PDE in eclipse.
Exported it to deployable plugin and pasted it in plugins folder of eclipse.
On Startup of eclipse, the plugins load automatically and come stacked with the console and other windows at the bottom of Eclipse.
I want to defer its automatic load/opening.
I want it to be opened only when I explicitly open it through Show View>My Plugin
Following is my plugin.xml :
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin autoStart="false">
<extension
id="application"
point="org.eclipse.core.runtime.applications">
<application>
<run
class="com.Myplugin.packages.Application">
</run>
</application>
</extension>
<extension
point="org.eclipse.ui.perspectives">
<perspective
name="Myplugin"
class="com.Myplugin.packages.Perspective"
id="Myplugin.perspective">
</perspective>
</extension>
<extension
point="org.eclipse.ui.views">
<view
name="Myplugin"
class="com.Myplugin.login.view.OpenView"
id="Myplugin.view">
</view>
</extension>
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="*">
<view
closeable="false"
id="Myplugin.view"
minimized="false"
relationship="stack"
relative="org.eclipse.debug.ui.ModuleView"
standalone="true"
visible="true">
</view>
</perspectiveExtension>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu">
</menuContribution>
</extension>
</plugin>
Perspective.java:
public class Perspective implements IPerspectiveFactory {
public void createInitialLayout(IPageLayout layout) {
try{
layout.setEditorAreaVisible(false);
layout.setFixed(true);
PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.addPerspectiveListener(new PerspectiveListener());
}catch(Exception e){
OpenView.log4jCallingForError("Perspective error : " +getStackTrace(e));
// Plugin.getLog().log(new Status(Status.INFO, Activator.PLUGIN_ID, Status.OK, e.getMessage(), e));
}
}
public static String getStackTrace(final Throwable throwable) {
final StringWriter sw = new StringWriter();
final PrintWriter pw = new PrintWriter(sw, true);
throwable.printStackTrace(pw);
return sw.getBuffer().toString();
}
}

You are specifying visible="true" in the perspective extensions definition of the view - this makes the view visibile as soon as the perspective is shown. Replace this with visible="false".
Note: You may have to reset the perspective to pick up changes to the perspective definition.

Changing my view properties from
<view
closeable="false"
id="Myplugin.view"
minimized="false"
relationship="stack"
relative="org.eclipse.debug.ui.ModuleView"
standalone="true"
visible="true">
</view>
to this
<view
closeable="true"
id="Myplugin.view:*"
minimized="false"
relationship="stack"
relative="org.eclipse.ui.views.ResourceNavigator"
standalone="true"
visible="false">
</view>
worked for me.

Related

How customize EditCustomfieldDefaults screen in my customfield plugin

I'm trying to override the default customfield value setting screen, but I'm unable to add the template.
The standard edit.vm template allows you to change the value of the field in the issue, but I need a separate page for this
enter image description here
My code from atlassian-plugin.xml
`
<customfield-type
name="Metro Cascading Custom Field"
i18n-name-key="metro-cascading-custom-field.name"
key="metro-cascading-custom-field"
class="MetroCascadingCustomField.MetroCascadingCustomField">
<description
key="metro-cascading-custom-field.description">The Metro Cascading Custom Field Plugin</description>
<resource name="view" type="velocity" location="/templates/customfields/metro-cascading-custom-field/view.vm"/>
<resource name="edit" type="velocity" location="/templates/customfields/metro-cascading-custom-field/edit.vm"/>
</customfield-type>
<webwork1
key="metro-cascading-cuastomfield-webwork"
name="Metro Cascading Cuastomfield Webwork"
i18n-name-key="metro-cascading-cuastomfield-webwork.name">
<description key="metro-cascading-cuastomfield-webwork.description">The Metro Cascading Cuastomfield Webwork Plugin</description>
<actions>
<action name="ru.jira.metro.plugin.jira.webwork.MetroCascadingCuastomfieldWebworkAction" alias="CustomMultiSelectOptionsConfiguration">>
<view name="success">/templates/metro-cascading-cuastomfield-webwork/success.vm</view>
<view name="input">/templates/metro-cascading-cuastomfield-webwork/input.vm</view>
<view name="error">/templates/metro-cascading-cuastomfield-webwork/error.vm</view>
</action>
</actions>
<context>atl.admin.custom-fields</context>
</webwork1>
`

<render-mode> not working with dynamic Material UI

I use the <render-mode> tag to include some html in my screen:
<?xml version="1.0" encoding="UTF-8"?>
<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-2.1.xsd"
require-authentication="anonymous-all">
<widgets>
<label type="h1" text="Hello world!"/>
<render-mode>
<text type="html,vuet" location="component://tutorial/template/hello.html"/>
</render-mode>
<label type="h1" text="after Hello world!"/>
</widgets>
</screen>
The incuded hello.html file is shown fine using the "standard UI" or "dynamic Bootstrap UI", but it doesn't show when using the "dynamic Material UI".
Is there a way to enable this? I much prefer the look and navigation of the dynamic Material UI.
Thank you!
The reason it doesn't show under qapps is that qapps uses a new render mode 'qvt' just like vapps uses the render mode 'vuet'. To make it show under /qapps just change:
<text type="html,vuet" ...
to:
<text type="html,vuet,qvt" ...

LoadException when trying to load new window fxml

I have javafx menu, I want to switch to another window. When I was using Java-8 everything worked, but now I switched to javafx-11 and java-11 and I cannot switch.
Switching code
AnchorPane pane = FXMLLoader.load(getClass().getResource("/main/main.fxml"), resources);
I was searching internet and stackoverflow and I tried following
1. In Inteliij idea I added all modules and libraries and applied the changes in Project Structure.
2. I added to src package module-info.java
3. I checked if fxml I am trying to load doesn´t contain any errors or unsed ids.
4. I checked names of controllers and fxmls I am trying to load
Code of the module-info.java
module duno {
requires javafx.fxml;
requires javafx.controls;
requires java.logging;
requires javafx.web;
opens main;
}
Code of the method from Controller which I am calling to get the Settings window
#FXML
void goto_settings(ActionEvent event) {
try {
ResourceBundle resources;
switch(settings.getLanguage().get(settings.getSelectedLanguage())) {
case "Czech":
resources = ResourceBundle.getBundle("/bundles/LangBundle_cz");
break;
default:
resources = ResourceBundle.getBundle("/bundles/LangBundle_en");
}
AnchorPane pane = load(getClass().getResource("/settings/settings.fxml"), resources);
rootpane.getChildren().setAll(pane);
} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
}
Settings Controller
package settings;
import duno.Serialization;
import duno.Settings;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.control.Alert;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ComboBox;
import javafx.scene.layout.AnchorPane;
import javafx.stage.DirectoryChooser;
import main.Main;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* FXML Controller class
*
* #author Filip
*/
public class SettingsController implements Initializable {
#FXML
private AnchorPane rootpane;
#FXML
private ComboBox<String> adf_combobox;
#FXML
private ComboBox<String> pf_combobox;
#FXML
private CheckBox del_checkbox;
#FXML
private ComboBox<String> language_combobox;
private Settings settings;
/**
* Initializes the controller class.
*/
#Override
public void initialize(URL url, ResourceBundle rb) {
/*
Load old settings or create new if settings file doesnt exist
*/
Serialization ser = new Serialization();
String fileName = ser.getFolder() + "settings" + ser.getExt();
File f = new File(fileName);
if(f.exists() && !f.isDirectory()) {
try {
Settings oldSettings = (Settings) ser.deserialize("settings");
settings = oldSettings;
} catch (IOException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
} else {
settings = new Settings();
}
/*
Setup the GUI
*/
adf_combobox.getItems().addAll(settings.getActiveDownloadFolder());
adf_combobox.getSelectionModel().select(settings.getSelectedActiveDownloadFolder());
pf_combobox.getItems().addAll(settings.getPreferredFormat());
pf_combobox.getSelectionModel().select(settings.getSelectedPreferredFormat());
del_checkbox.setSelected(settings.isDownloadEntireList());
language_combobox.getItems().addAll(settings.getLanguage());
language_combobox.getSelectionModel().select(settings.getSelectedLanguage());
}
#FXML
void addNewDownloadFolder(ActionEvent event) {
DirectoryChooser directoryChooser = new DirectoryChooser();
File selectedDirectory = directoryChooser.showDialog(rootpane.getScene().getWindow());
if(selectedDirectory == null){
// Nothing was selected
} else{
settings.addActiveDownloadFolder(selectedDirectory.getAbsolutePath());
System.out.println(settings.getActiveDownloadFolder().toString());
adf_combobox.getItems().setAll(settings.getActiveDownloadFolder());
}
}
#FXML
void removeSelectedDownloadFolder(ActionEvent event) {
if(adf_combobox.getItems().size() <= 1) {
Alert alert = new Alert(Alert.AlertType.WARNING);
alert.setTitle("Warning Dialog");
alert.setHeaderText("You can´t remove this download folder");
alert.setContentText("You can´t remove all download folders");
alert.showAndWait();
} else {
int item = adf_combobox.getSelectionModel().getSelectedIndex();
settings.removeActiveDownloadFolder(item);
adf_combobox.getItems().setAll(settings.getActiveDownloadFolder());
adf_combobox.getSelectionModel().selectFirst();
}
}
#FXML
void saveSettings(ActionEvent event) {
settings.setSelectedActiveDownloadFolder(adf_combobox.getSelectionModel().getSelectedIndex());
settings.setSelectedPreferredFormat(pf_combobox.getSelectionModel().getSelectedIndex());
settings.setDownloadEntireList(del_checkbox.isSelected());
settings.setSelectedLanguage(language_combobox.getSelectionModel().getSelectedIndex());
System.out.println(settings.getLanguage().get(settings.getSelectedLanguage()));
Serialization ser = new Serialization();
String fileName = ser.getFolder() + "settings" + ser.getExt();
File f = new File(fileName);
if(f.delete()) {
System.out.println("File deleted");
ser.serialize(settings, "settings");
} else {
System.out.println("Settings file not deleted");
}
}
#FXML
void gotoDownloads(ActionEvent event) {
try {
ResourceBundle resources;
switch(settings.getLanguage().get(settings.getSelectedLanguage())) {
case "Czech":
resources = ResourceBundle.getBundle("bundles/LangBundle_cz");
break;
default:
resources = ResourceBundle.getBundle("bundles/LangBundle_en");
}
AnchorPane pane = FXMLLoader.load(getClass().getResource("/main/main.fxml"), resources);
rootpane.getChildren().setAll(pane);
} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
Settings fxml
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Menu?>
<?import javafx.scene.control.MenuBar?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.RowConstraints?>
<AnchorPane id="AnchorPane" fx:id="rootpane" minHeight="800.0" minWidth="1000.0" prefHeight="800.0" prefWidth="1000.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="settings.SettingsController">
<children>
<GridPane AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<MenuBar>
<menus>
<Menu mnemonicParsing="false" onAction="#gotoDownloads" text="Download">
<items>
<MenuItem mnemonicParsing="false" onAction="#gotoDownloads" text="Download" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Settings">
<items>
<MenuItem mnemonicParsing="false" text="Settings" />
</items>
</Menu>
</menus>
</MenuBar>
<GridPane GridPane.rowIndex="1">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="443.79998779296875" minWidth="10.0" prefWidth="272.8000244140625" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="561.4000396728516" minWidth="10.0" prefWidth="303.1999755859375" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="737.199951171875" minWidth="10.0" prefWidth="289.60002441406255" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="575.4000244140625" minWidth="10.0" prefWidth="121.20002441406245" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" />
<RowConstraints minHeight="10.0" prefHeight="30.0" />
<RowConstraints minHeight="10.0" prefHeight="30.0" />
<RowConstraints minHeight="10.0" prefHeight="30.0" />
<RowConstraints minHeight="10.0" prefHeight="30.0" />
</rowConstraints>
<children>
<Label text="%active_download_folder_text" />
<ComboBox fx:id="adf_combobox" prefHeight="26.0" prefWidth="294.0" GridPane.columnIndex="1" />
<HBox prefHeight="100.0" prefWidth="200.0" GridPane.columnIndex="2">
<children>
<Button mnemonicParsing="false" onAction="#addNewDownloadFolder" text="%add_new_active_download_folder_button_text" />
<Button mnemonicParsing="false" onAction="#removeSelectedDownloadFolder" text="%remove_selected_active_download_folder_button_text" />
</children>
<padding>
<Insets top="5.0" />
</padding>
</HBox>
<Label text="%preferred_format_text" GridPane.rowIndex="1" />
<ComboBox fx:id="pf_combobox" prefHeight="26.0" prefWidth="114.0" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<HBox prefHeight="100.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="1">
<opaqueInsets>
<Insets top="5.0" />
</opaqueInsets>
<padding>
<Insets top="5.0" />
</padding>
</HBox>
<Label text="%always_download_entire_list_text" GridPane.rowIndex="2" />
<CheckBox fx:id="del_checkbox" mnemonicParsing="false" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<Label text="%language_text" GridPane.rowIndex="3" />
<ComboBox fx:id="language_combobox" prefHeight="26.0" prefWidth="162.0" GridPane.columnIndex="1" GridPane.rowIndex="3" />
<HBox prefHeight="100.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="3">
<padding>
<Insets top="5.0" />
</padding>
</HBox>
<Button mnemonicParsing="false" onAction="#saveSettings" text="%save_button_text" GridPane.columnIndex="3" GridPane.rowIndex="4" />
</children>
<padding>
<Insets left="20.0" top="10.0" />
</padding>
</GridPane>
</children>
</GridPane>
</children>
</AnchorPane>
It should load settings window as it did in java-8 but now I got and error
Run log
"C:\Program Files\Java\jdk-11.0.3\bin\java.exe" --add-modules javafx.base,javafx.graphics --add-reads javafx.base=ALL-UNNAMED --add-reads javafx.graphics=ALL-UNNAMED "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1.1\lib\idea_rt.jar=50856:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1.1\bin" -Dfile.encoding=UTF-8 -p C:\Users\Filip\Documents\javafx-sdk-11.0.2\lib\javafx.base.jar;C:\Users\Filip\Documents\javafx-sdk-11.0.2\lib\javafx.graphics.jar;E:\duno\out\production\duno;C:\Users\Filip\Documents\javafx-sdk-11.0.2\lib\javafx-swt.jar;C:\Users\Filip\Documents\javafx-sdk-11.0.2\lib\javafx.controls.jar;C:\Users\Filip\Documents\javafx-sdk-11.0.2\lib\javafx.fxml.jar;C:\Users\Filip\Documents\javafx-sdk-11.0.2\lib\javafx.media.jar;C:\Users\Filip\Documents\javafx-sdk-11.0.2\lib\javafx.swing.jar;C:\Users\Filip\Documents\javafx-sdk-11.0.2\lib\javafx.web.jar -m duno/main.Main
English
kvě 10, 2019 10:57:10 DOP. main.Controller goto_settings
SEVERE: null
javafx.fxml.LoadException:
/E:/duno/out/production/duno/settings/settings.fxml:17
at javafx.fxml/javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2625)
at javafx.fxml/javafx.fxml.FXMLLoader.access$700(FXMLLoader.java:105)
at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:943)
at javafx.fxml/javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:980)
at javafx.fxml/javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:227)
at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:752)
at javafx.fxml/javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2722)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2552)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2466)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3237)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3194)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3163)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3136)
at javafx.fxml/javafx.fxml.FXMLLoader.load(FXMLLoader.java:3128)
at duno/main.Controller.goto_settings(Controller.java:184)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.javafx.reflect.Trampoline.invoke(MethodUtil.java:76)
at jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at javafx.base/com.sun.javafx.reflect.MethodUtil.invoke(MethodUtil.java:273)
at javafx.fxml/com.sun.javafx.fxml.MethodHelper.invoke(MethodHelper.java:83)
at javafx.fxml/javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1782)
at javafx.fxml/javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1670)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
at javafx.controls/javafx.scene.control.MenuItem.fire(MenuItem.java:465)
at javafx.controls/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.doSelect(ContextMenuContent.java:1380)
at javafx.controls/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.lambda$createChildren$12(ContextMenuContent.java:1333)
at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Scene.java:3851)
at javafx.graphics/javafx.scene.Scene$MouseHandler.access$1200(Scene.java:3579)
at javafx.graphics/javafx.scene.Scene.processMouseEvent(Scene.java:1849)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2588)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:397)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:434)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:390)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:433)
at javafx.graphics/com.sun.glass.ui.View.handleMouseEvent(View.java:556)
at javafx.graphics/com.sun.glass.ui.View.notifyMouse(View.java:942)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IllegalAccessException: class javafx.fxml.FXMLLoader$ValueElement (in module javafx.fxml) cannot access class settings.SettingsController (in module duno) because module duno does not export settings to module javafx.fxml
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)
at java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:99)
at java.base/java.lang.Class.newInstance(Class.java:579)
at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:936)
... 66 more
Don´t mind the English in the output it´s just the language used in app
I figured it out on my own.
Here is how I proceeded.
I read the error several times, and then I though it need to export something. So I found that module info have exports something to something. So I added exports settings to javafx.fxml.
Another problem that I could not access settings because rootpane was private and settings were not opened. So I tried open settings; and it works :)
So here is final version
module duno {
requires javafx.fxml;
requires javafx.controls;
requires java.logging;
requires javafx.web;
exports settings to javafx.fxml;
opens main;
opens settings;
}
I hope it helps someone in future with same error

variable to custom component - flex

I'm trying to pass a variable from my main flex application to a custom component I've created, but haven't really figured anything out.
my variable is just a string - public var test:String = "a test";
my custom component is implement in my main application like this - <ns1:finaltest includeIn="FinalTest" x="26" y="19" />
In my custom component 'finaltest' I'd like just to display the variable 'test'. something like this - finalmessage.text = test;
MainApp.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="955" minHeight="600" xmlns:local="*"
>
<fx:Script>
<![CDATA[
[Bindable]
public var test:String = "a test";
]]>
</fx:Script>
<local:FinalTest finalMessage="{test}" />
</s:Application>
FinalTest.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="400" height="300"
>
<fx:Script>
<![CDATA[
[Bindable]
public var finalMessage:String;
]]>
</fx:Script>
<s:Label text="{finalMessage}" />
</s:Group>

FlashBuilder 4/Flex, set transparent background for web app?

I'm embeding a flex application into a web page using the most recent version of swfobject.js. I've set wmode to transparent and all that but whatever I've enterd for the embeded objects default size, is then a white background within my application. I've set the application's backgroundAlpha to 0 and I know that part works because my aplication resizes after it has finished loading. The resized portion of the application is transparent but the rest still has the white background so it's obvious it has something to do with the application and not the html or javascript embedding it. How do i fix this?
Looking at the default application skin I noticed that it makes use of the backgroundColor style property to set the fill color for the backgroundRect of the applicaton. However, there's no mention of backgroundAlpha so I created a new application skin and added a single line of code which works!
Below this line:
bgRectFill.color = getStyle('backgroundColor');
Add the following:
bgRectFill.alpha = getStyle('backgroundAlpha');
In your application .mxml file set the skinClass property to:
skinClass="YourSkinsDirectory.YourApplicationSkin"
I have mine saved as ApplicationSkin.mxml in a folder called Skins
so mine looks like this: skinClass="Skins.ApplicationSkin"
Here's the full skin:
<?xml version="1.0" encoding="utf-8"?>
<!--
ADOBE SYSTEMS INCORPORATED
Copyright 2008 Adobe Systems Incorporated
All Rights Reserved.
NOTICE: Adobe permits you to use, modify, and distribute this file
in accordance with the terms of the license agreement accompanying it.
-->
<!--- The default skin class for the Spark Application component.
#see spark.components.Application
#langversion 3.0
#playerversion Flash 10
#playerversion AIR 1.5
#productversion Flex 4
-->
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:fb="http://ns.adobe.com/flashbuilder/2009" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5">
<fx:Metadata>
<![CDATA[
/**
* A strongly typed property that references the component to which this skin is applied.
*/
[HostComponent("spark.components.Application")]
]]>
</fx:Metadata>
<fx:Script fb:purpose="styling">
<![CDATA[
/**
* #private
*/
override protected function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number) : void
{
bgRectFill.color = getStyle('backgroundColor');
bgRectFill.alpha = getStyle('backgroundAlpha');
super.updateDisplayList(unscaledWidth, unscaledHeight);
}
]]>
</fx:Script>
<s:states>
<s:State name="normal" />
<s:State name="disabled" />
<s:State name="normalWithControlBar" />
<s:State name="disabledWithControlBar" />
</s:states>
<!-- fill -->
<!---
A rectangle with a solid color fill that forms the background of the application.
The color of the fill is set to the Application's backgroundColor property.
-->
<s:Rect id="backgroundRect" left="0" right="0" top="0" bottom="0">
<s:fill>
<!--- #private -->
<s:SolidColor id="bgRectFill" color="#FFFFFF" alpha="1"/>
</s:fill>
</s:Rect>
<s:Group left="0" right="0" top="0" bottom="0">
<s:layout>
<s:VerticalLayout gap="0" horizontalAlign="justify" />
</s:layout>
<!---
#private
Application Control Bar
-->
<s:Group id="topGroup" minWidth="0" minHeight="0"
includeIn="normalWithControlBar, disabledWithControlBar" >
<!-- layer 0: control bar highlight -->
<s:Rect left="0" right="0" top="0" bottom="1" >
<s:stroke>
<s:LinearGradientStroke rotation="90" weight="1">
<s:GradientEntry color="0xFFFFFF" />
<s:GradientEntry color="0xD8D8D8" />
</s:LinearGradientStroke>
</s:stroke>
</s:Rect>
<!-- layer 1: control bar fill -->
<s:Rect left="1" right="1" top="1" bottom="2" >
<s:fill>
<s:LinearGradient rotation="90">
<s:GradientEntry color="0xEDEDED" />
<s:GradientEntry color="0xCDCDCD" />
</s:LinearGradient>
</s:fill>
</s:Rect>
<!-- layer 2: control bar divider line -->
<s:Rect left="0" right="0" bottom="0" height="1" alpha="0.55">
<s:fill>
<s:SolidColor color="0x000000" />
</s:fill>
</s:Rect>
<!-- layer 3: control bar -->
<!--- #copy spark.components.Application#controlBarGroup -->
<s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">
<s:layout>
<s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
</s:layout>
</s:Group>
</s:Group>
<!--- #copy spark.components.SkinnableContainer#contentGroup -->
<s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0" />
</s:Group>
</s:Skin>