Skip to content

Commit

Permalink
fix: Removed FX8 qualifier in BuiltInLibrary (#592)
Browse files Browse the repository at this point in the history
Co-authored-by: Oliver-Loeffler <[email protected]>
  • Loading branch information
Oliver-Loeffler and Oliver-Loeffler committed Nov 8, 2022
1 parent 4cd7775 commit 484a1fe
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2022, Gluon and/or its affiliates.
* Copyright (c) 2012, 2014, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
Expand Down Expand Up @@ -127,11 +128,8 @@ public void updateItem(LibraryListItem item, boolean empty) {
if (item.getLibItem() != null) {
// A qualifier needed to discriminate items is kept in the ID:
// this applies to orientation as well as empty qualifiers.
// FX8 qualifier is not kept as there's no ambiguity there.
String id = item.getLibItem().getName();
if (id.contains(BuiltinLibrary.getFX8Qualifier())) {
id = id.substring(0, id.indexOf(BuiltinLibrary.getFX8Qualifier()));
}

// If QE were about to test a localized version the ID should
// remain unchanged.
if (id.contains(BuiltinLibrary.getEmptyQualifier())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ public class BuiltinLibrary extends Library {
private final BuiltinSectionComparator sectionComparator
= new BuiltinSectionComparator();

private static final String FX8_QUALIFIER = " (FX8)"; //NOI18N

// This qualifier is for use to provide a flavor of a component that has no
// children, in addition to the one having children. Typical use is for
// Accordion, ScrollPane, SplitPane, TabPane, TitledPane (see DTL-6274).
Expand All @@ -89,11 +87,7 @@ public static synchronized BuiltinLibrary getLibrary() {
}
return library;
}

public static String getFX8Qualifier() {
return FX8_QUALIFIER;
}


public static String getEmptyQualifier() {
return EMPTY_QUALIFIER;
}
Expand Down Expand Up @@ -186,9 +180,9 @@ private BuiltinLibrary() {
"AccordionEmpty", "Accordion", EMPTY_QUALIFIER); //NOI18N
addRegionItem200x200(javafx.scene.layout.AnchorPane.class, TAG_CONTAINERS);
addRegionItem200x200(javafx.scene.layout.BorderPane.class, TAG_CONTAINERS);
addCustomizedItem(javafx.scene.control.ButtonBar.class, TAG_CONTAINERS, FX8_QUALIFIER);
addCustomizedItem(javafx.scene.control.DialogPane.class, TAG_CONTAINERS, FX8_QUALIFIER);
addDefaultItem(javafx.scene.control.DialogPane.class, TAG_CONTAINERS, EMPTY_QUALIFIER, FX8_QUALIFIER);
addCustomizedItem(javafx.scene.control.ButtonBar.class, TAG_CONTAINERS);
addCustomizedItem(javafx.scene.control.DialogPane.class, TAG_CONTAINERS);
addDefaultItem(javafx.scene.control.DialogPane.class, TAG_CONTAINERS, EMPTY_QUALIFIER);
addRegionItem200x200(javafx.scene.layout.FlowPane.class, TAG_CONTAINERS);
addCustomizedItem(javafx.scene.layout.GridPane.class, TAG_CONTAINERS);
addRegionItem200x100(javafx.scene.layout.HBox.class, TAG_CONTAINERS);
Expand All @@ -206,7 +200,7 @@ private BuiltinLibrary() {
addCustomizedItem(javafx.scene.control.TabPane.class, TAG_CONTAINERS);
addCustomizedItem(javafx.scene.control.TabPane.class, TAG_CONTAINERS,
"TabPaneEmpty", "TabPane", EMPTY_QUALIFIER); //NOI18N
addRegionItem200x200(javafx.scene.text.TextFlow.class, TAG_CONTAINERS, FX8_QUALIFIER);
addRegionItem200x200(javafx.scene.text.TextFlow.class, TAG_CONTAINERS);
addRegionItem200x200(javafx.scene.layout.TilePane.class, TAG_CONTAINERS);
addCustomizedItem(javafx.scene.control.TitledPane.class, TAG_CONTAINERS);
addRegionItem200x200(javafx.scene.control.TitledPane.class, TAG_CONTAINERS, EMPTY_QUALIFIER);
Expand All @@ -219,7 +213,7 @@ private BuiltinLibrary() {
addCustomizedItem(javafx.scene.control.ChoiceBox.class, TAG_CONTROLS);
addDefaultItem(javafx.scene.control.ColorPicker.class, TAG_CONTROLS);
addCustomizedItem(javafx.scene.control.ComboBox.class, TAG_CONTROLS);
addDefaultItem(javafx.scene.control.DatePicker.class, TAG_CONTROLS, FX8_QUALIFIER);
addDefaultItem(javafx.scene.control.DatePicker.class, TAG_CONTROLS);
addCustomizedItem(javafx.scene.web.HTMLEditor.class, TAG_CONTROLS);
addCustomizedItem(javafx.scene.control.Hyperlink.class, TAG_CONTROLS);
addCustomizedItem(javafx.scene.image.ImageView.class, TAG_CONTROLS);
Expand All @@ -245,15 +239,15 @@ private BuiltinLibrary() {
"SliderH", "Slider-h", HORIZONTAL_QUALIFIER); //NOI18N
addCustomizedItem(javafx.scene.control.Slider.class, TAG_CONTROLS,
"SliderV", "Slider-v", VERTICAL_QUALIFIER); //NOI18N
addDefaultItem(javafx.scene.control.Spinner.class, TAG_CONTROLS, FX8_QUALIFIER);
addDefaultItem(javafx.scene.control.Spinner.class, TAG_CONTROLS);
addCustomizedItem(javafx.scene.control.SplitMenuButton.class, TAG_CONTROLS);
addCustomizedItem(javafx.scene.control.TableColumn.class, TAG_CONTROLS);
addCustomizedItem(javafx.scene.control.TableView.class, TAG_CONTROLS);
addRegionItem200x200(javafx.scene.control.TextArea.class, TAG_CONTROLS);
addDefaultItem(javafx.scene.control.TextField.class, TAG_CONTROLS);
addCustomizedItem(javafx.scene.control.ToggleButton.class, TAG_CONTROLS);
addCustomizedItem(javafx.scene.control.TreeTableColumn.class, TAG_CONTROLS, FX8_QUALIFIER);
addCustomizedItem(javafx.scene.control.TreeTableView.class, TAG_CONTROLS, FX8_QUALIFIER);
addCustomizedItem(javafx.scene.control.TreeTableColumn.class, TAG_CONTROLS);
addCustomizedItem(javafx.scene.control.TreeTableView.class, TAG_CONTROLS);
addRegionItem200x200(javafx.scene.control.TreeView.class, TAG_CONTROLS);
addCustomizedItem(javafx.scene.web.WebView.class, TAG_CONTROLS);

Expand All @@ -272,32 +266,32 @@ private BuiltinLibrary() {
addRegionItem200x200(javafx.scene.layout.Region.class, TAG_MISCELLANEOUS);
addCustomizedItem(javafx.scene.Scene.class, TAG_MISCELLANEOUS);
addCustomizedItem(javafx.stage.Stage.class, TAG_MISCELLANEOUS);
addCustomizedItem(javafx.scene.SubScene.class, TAG_MISCELLANEOUS, FX8_QUALIFIER);
addDefaultItem(javafx.embed.swing.SwingNode.class, TAG_MISCELLANEOUS, FX8_QUALIFIER);
addCustomizedItem(javafx.scene.SubScene.class, TAG_MISCELLANEOUS);
addDefaultItem(javafx.embed.swing.SwingNode.class, TAG_MISCELLANEOUS);
addCustomizedItem(javafx.scene.control.Tooltip.class, TAG_MISCELLANEOUS);

// Shapes
addCustomizedItem(javafx.scene.shape.Arc.class, TAG_SHAPES);
addDefaultItem(javafx.scene.shape.ArcTo.class, TAG_SHAPES);
addCustomizedItem(javafx.scene.shape.Box.class, TAG_SHAPES, FX8_QUALIFIER);
addCustomizedItem(javafx.scene.shape.Box.class, TAG_SHAPES);
addCustomizedItem(javafx.scene.shape.Circle.class, TAG_SHAPES);
addDefaultItem(javafx.scene.shape.ClosePath.class, TAG_SHAPES);
addCustomizedItem(javafx.scene.shape.CubicCurve.class, TAG_SHAPES);
addDefaultItem(javafx.scene.shape.CubicCurveTo.class, TAG_SHAPES);
addCustomizedItem(javafx.scene.shape.Cylinder.class, TAG_SHAPES, FX8_QUALIFIER);
addCustomizedItem(javafx.scene.shape.Cylinder.class, TAG_SHAPES);
addCustomizedItem(javafx.scene.shape.Ellipse.class, TAG_SHAPES);
addDefaultItem(javafx.scene.shape.HLineTo.class, TAG_SHAPES);
addCustomizedItem(javafx.scene.shape.Line.class, TAG_SHAPES);
addDefaultItem(javafx.scene.shape.LineTo.class, TAG_SHAPES);
addDefaultItem(javafx.scene.shape.MeshView.class, TAG_SHAPES, FX8_QUALIFIER);
addDefaultItem(javafx.scene.shape.MeshView.class, TAG_SHAPES);
addDefaultItem(javafx.scene.shape.MoveTo.class, TAG_SHAPES);
addCustomizedItem(javafx.scene.shape.Path.class, TAG_SHAPES);
addCustomizedItem(javafx.scene.shape.Polygon.class, TAG_SHAPES);
addCustomizedItem(javafx.scene.shape.Polyline.class, TAG_SHAPES);
addCustomizedItem(javafx.scene.shape.QuadCurve.class, TAG_SHAPES);
addDefaultItem(javafx.scene.shape.QuadCurveTo.class, TAG_SHAPES);
addCustomizedItem(javafx.scene.shape.Rectangle.class, TAG_SHAPES);
addCustomizedItem(javafx.scene.shape.Sphere.class, TAG_SHAPES, FX8_QUALIFIER);
addCustomizedItem(javafx.scene.shape.Sphere.class, TAG_SHAPES);
addCustomizedItem(javafx.scene.shape.SVGPath.class, TAG_SHAPES);
addCustomizedItem(javafx.scene.text.Text.class, TAG_SHAPES);
addDefaultItem(javafx.scene.shape.VLineTo.class, TAG_SHAPES);
Expand All @@ -313,10 +307,10 @@ private BuiltinLibrary() {
addCustomizedItem(javafx.scene.chart.StackedBarChart.class, TAG_CHARTS);

// 3D
addCustomizedItem(javafx.scene.AmbientLight.class, TAG_3D, FX8_QUALIFIER);
addDefaultItem(javafx.scene.ParallelCamera.class, TAG_3D, FX8_QUALIFIER);
addDefaultItem(javafx.scene.PerspectiveCamera.class, TAG_3D, FX8_QUALIFIER);
addCustomizedItem(javafx.scene.PointLight.class, TAG_3D, FX8_QUALIFIER);
addCustomizedItem(javafx.scene.AmbientLight.class, TAG_3D);
addDefaultItem(javafx.scene.ParallelCamera.class, TAG_3D);
addDefaultItem(javafx.scene.PerspectiveCamera.class, TAG_3D);
addCustomizedItem(javafx.scene.PointLight.class, TAG_3D);
}


Expand Down

0 comments on commit 484a1fe

Please sign in to comment.