8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package test.javafx.fxml;
27
28 import java.io.IOException;
29 import java.util.Map;
30 import javafx.fxml.FXMLLoader;
31 import javafx.fxml.LoadListener;
32 import org.junit.Test;
33
34 import static org.junit.Assert.*;
35
36 public class RT_18218Test {
37 @Test
38 @SuppressWarnings({"unchecked", "deprecation"})
39 public void testStaticScriptLoad() throws IOException {
40 FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("rt_18218.fxml"));
41 fxmlLoader.impl_setStaticLoad(true);
42 fxmlLoader.setLoadListener(new LoadListener() {
43 private String unknownStaticPropertyElementName = null;
44
45 @Override
46 public void readImportProcessingInstruction(String target) {
47 }
48
49 @Override
50 public void readLanguageProcessingInstruction(String language) {
51 }
52
53 @Override
54 public void readComment(String comment) {
55 }
56
57 @Override
58 public void beginInstanceDeclarationElement(Class<?> type) {
59 }
60
61 @Override
|
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package test.javafx.fxml;
27
28 import com.sun.javafx.fxml.FXMLLoaderHelper;
29 import java.io.IOException;
30 import java.util.Map;
31 import javafx.fxml.FXMLLoader;
32 import javafx.fxml.LoadListener;
33 import org.junit.Test;
34
35 import static org.junit.Assert.*;
36
37 public class RT_18218Test {
38 @Test
39 @SuppressWarnings({"unchecked", "deprecation"})
40 public void testStaticScriptLoad() throws IOException {
41 FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("rt_18218.fxml"));
42 FXMLLoaderHelper.setStaticLoad(fxmlLoader, true);
43 fxmlLoader.setLoadListener(new LoadListener() {
44 private String unknownStaticPropertyElementName = null;
45
46 @Override
47 public void readImportProcessingInstruction(String target) {
48 }
49
50 @Override
51 public void readLanguageProcessingInstruction(String language) {
52 }
53
54 @Override
55 public void readComment(String comment) {
56 }
57
58 @Override
59 public void beginInstanceDeclarationElement(Class<?> type) {
60 }
61
62 @Override
|