Java 8:  javafx.scene.text.Text.impl_selectionFillProperty()
Java 9+: javafx.scene.text.Text.selectionFillProperty()
6683
@SuppressWarnings("unchecked")
    static ObjectProperty<Paint> Text_selectionFillProperty(Text text) {
        try {
            if (mText_selectionFillProperty == null) {
                mText_selectionFillProperty = Text.class.getMethod(
                        isJava9orLater ? "selectionFillProperty" : "impl_selectionFillProperty");
            }
            return (ObjectProperty<Paint>) mText_selectionFillProperty.invoke(text);
        } catch(NoSuchMethodException | SecurityException | IllegalAccessException |
                IllegalArgumentException | InvocationTargetException e) {
            e.printStackTrace();
            throw new Error(e);
        }
    }
63600
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
    {
        this.setControlValue(value);
        if (isSelected && !hasFocus) {
            this.setForeground(table.getSelectionForeground());
            this.setBackground(table.getSelectionBackground());
        }
        else {
            this.setForeground(table.getForeground());
            this.setBackground(table.getBackground());
        }
        return this;
    }
436349
static Converter getSelectItemsValueConverter(Iterator<SelectItem> iterator, FacesContext facesContext)
    {
        // Attention!
        // This code is duplicated in jsfapi component package.
        // If you change something here please do the same in the other class!
        
        Converter converter = null;
        while (converter == null && iterator.hasNext())
        {
            SelectItem item = iterator.next();
            if (item instanceof SelectItemGroup)
            {
                Iterator<SelectItem> groupIterator = Arrays.asList(
                        ((SelectItemGroup) item).getSelectItems()).iterator();
                converter = getSelectItemsValueConverter(groupIterator, facesContext);
            }
            else
            {
                Class<?> selectItemsType = item.getValue().getClass();
                
                // optimization: no conversion for String values
                if (String.class.equals(selectItemsType))
                {
                    return null;
                }
                
                try
                {
                    converter = facesContext.getApplication().createConverter(selectItemsType);
                }
                catch (FacesException e)
                {
                    // nothing - try again
                }
            }
        }
        return converter;
    }
841357
private void findLocalComponentsForComponent(LocalComponents localComponents,
      TypeElement componentTypeElement) {
    Component componentAnnotation = componentTypeElement.getAnnotation(Component.class);
    if (componentAnnotation == null) {
      return;
    }

    processLocalComponentClass(localComponents, componentTypeElement);
    getComponentLocalComponents(elements, componentTypeElement)
        .stream()
        .map(DeclaredType.class::cast)
        .map(DeclaredType::asElement)
        .map(TypeElement.class::cast)
        .forEach(childTypeElement -> processLocalComponentClass(localComponents,
            childTypeElement));

    getSuperComponentType(componentTypeElement)
        .ifPresent(superComponentType -> findLocalComponentsForComponent(
            localComponents,
            superComponentType));
  }
162970
String showScriptContextHTML( String s, int lineNo, int context )
    {
        StringBuilder sb = new StringBuilder();
        BufferedReader br = new BufferedReader( new StringReader(s) );

        int beginLine = Math.max( 1, lineNo-context );
        int endLine = lineNo + context;
        for( int i=1; i<=lineNo+context+1; i++ )
        {
            if ( i < beginLine )
            {
                try {
                    br.readLine();
                } catch ( IOException e ) {
                    throw new RuntimeException( e.toString() );
                }
                continue;
            }
            if ( i > endLine )
                break;

            String line;
            try {
                line = br.readLine();
            } catch ( IOException e ) {
                throw new RuntimeException( e.toString() );
            }

            if ( line == null )
                break;
            if ( i == lineNo )
                sb.append( "<font color=\"red\">"+i+": "+line +"</font><br/>" );
            else
                sb.append( i+": " +line +"<br/>" );
        }

        return sb.toString();
    }
589151
public XTextComponent addTextField(String content, String name, int x,
            int y, int width, int height) throws Exception {
        Object labelModel = multiServiceFactory.createInstance("com.sun.star.awt.UnoControlEditModel");
        XPropertySet textFieldProperties = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, labelModel);
        textFieldProperties.setPropertyValue("PositionX", new Integer(x));
        textFieldProperties.setPropertyValue("PositionY", new Integer(y));
        textFieldProperties.setPropertyValue("Width", new Integer(width));
        textFieldProperties.setPropertyValue("Height", new Integer(height));
        textFieldProperties.setPropertyValue("Name", name);
        textFieldProperties.setPropertyValue("TabIndex", new Short(
                (short) tabcount++));
        textFieldProperties.setPropertyValue("MultiLine", new Boolean(false));
        textFieldProperties.setPropertyValue("Text", content);

        // insert the control models into the dialog model
        this.nameContainer.insertByName(name, labelModel);

        XControlContainer controlContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, this.oUnoDialog);
        Object obj = controlContainer.getControl(name);
        XTextComponent field = (XTextComponent) UnoRuntime.queryInterface(
                XTextComponent.class, obj);

        return field;
    }
1347962
protected StringBuffer buildTextInput(boolean editable) {

        StringBuffer result = new StringBuffer(256);
        Iterator<String> i = getExplorerTypeSettings().getProperties().iterator();
        // iterate over the properties
        while (i.hasNext()) {
            String curProperty = i.next();
            result.append(buildPropertyEntry(curProperty, curProperty, editable));
        }
        return result;
    }
1159657
private void validateStringPropBinding(LocalComponentProp localComponentProp) {
    if (localComponentProp.getType().toString().equals(String.class.getCanonicalName())) {
      return;
    }

    logger.error("Passing a String to a non String Prop: \""
        + localComponentProp.getPropName()
        + "\". "
        + "If you want to pass a boolean or an int you should use v-bind. "
        + "For example: v-bind:my-prop=\"12\" (or using the short syntax, :my-prop=\"12\") instead of my-prop=\"12\".");
  }
582990
@SuppressWarnings("unchecked")
    private PropertyDescriptor[] introspectProperties(Class<?> stopClass)
            throws IntrospectionException {

        // Get descriptors for the public methods
        MethodDescriptor[] methodDescriptors = introspectMethods();

        if (methodDescriptors == null) {
            return null;
        }

        ArrayList<MethodDescriptor> methodList = new ArrayList<MethodDescriptor>();
        // Loop over the methods found, looking for public non-static methods
        for (int index = 0; index < methodDescriptors.length; index++) {
            int modifiers = methodDescriptors[index].getMethod().getModifiers();
            if (!Modifier.isStatic(modifiers)) {
                methodList.add(methodDescriptors[index]);
            }
        }

        // Get the list of public non-static methods into an array
        int methodCount = methodList.size();
        MethodDescriptor[] theMethods = null;
        if (methodCount > 0) {
            theMethods = new MethodDescriptor[methodCount];
            theMethods = methodList.toArray(theMethods);
        }

        if (theMethods == null) {
            return null;
        }

        HashMap<String, HashMap> propertyTable = new HashMap<String, HashMap>(
                theMethods.length);

        // Search for methods that either get or set a Property
        for (int i = 0; i < theMethods.length; i++) {
            introspectGet(theMethods[i].getMethod(), propertyTable);
            introspectSet(theMethods[i].getMethod(), propertyTable);
        }

        // fix possible getter & setter collisions
        fixGetSet(propertyTable);

        // If there are listener methods, should be bound.
        MethodDescriptor[] allMethods = introspectMethods(true);
        if (stopClass != null) {
            MethodDescriptor[] excludeMethods = introspectMethods(true,
                    stopClass);
            if (excludeMethods != null) {
                ArrayList<MethodDescriptor> tempMethods = new ArrayList<MethodDescriptor>();
                for (MethodDescriptor method : allMethods) {
                    if (!isInSuper(method, excludeMethods)) {
                        tempMethods.add(method);
                    }
                }
                allMethods = tempMethods
                        .toArray(new MethodDescriptor[0]);
            }
        }
        for (int i = 0; i < allMethods.length; i++) {
            introspectPropertyListener(allMethods[i].getMethod());
        }
        // Put the properties found into the PropertyDescriptor array
        ArrayList<PropertyDescriptor> propertyList = new ArrayList<PropertyDescriptor>();

        for (Map.Entry<String, HashMap> entry : propertyTable.entrySet()) {
            String propertyName = entry.getKey();
            HashMap table = entry.getValue();
            if (table == null) {
                continue;
            }
            String normalTag = (String) table.get(STR_NORMAL);
            String indexedTag = (String) table.get(STR_INDEXED);

            if ((normalTag == null) && (indexedTag == null)) {
                continue;
            }

            Method get = (Method) table.get(STR_NORMAL + PREFIX_GET);
            Method set = (Method) table.get(STR_NORMAL + PREFIX_SET);
            Method indexedGet = (Method) table.get(STR_INDEXED + PREFIX_GET);
            Method indexedSet = (Method) table.get(STR_INDEXED + PREFIX_SET);

            PropertyDescriptor propertyDesc = null;
            if (indexedTag == null) {
                propertyDesc = new PropertyDescriptor(propertyName, get, set);
            } else {
                try {
                    propertyDesc = new IndexedPropertyDescriptor(propertyName,
                            get, set, indexedGet, indexedSet);
                } catch (IntrospectionException e) {
                    // If the getter and the indexGetter is not compatible, try
                    // getter/setter is null;
                    propertyDesc = new IndexedPropertyDescriptor(propertyName,
                            null, null, indexedGet, indexedSet);
                }
            }
            // RI set propretyDescriptor as bound. FIXME
            // propertyDesc.setBound(true);
            if (canAddPropertyChangeListener && canRemovePropertyChangeListener) {
                propertyDesc.setBound(true);
            } else {
                propertyDesc.setBound(false);
            }
            if (table.get(STR_IS_CONSTRAINED) == Boolean.TRUE) { //$NON-NLS-1$
                propertyDesc.setConstrained(true);
            }
            propertyList.add(propertyDesc);
        }

        PropertyDescriptor[] theProperties = new PropertyDescriptor[propertyList
                .size()];
        propertyList.toArray(theProperties);
        return theProperties;
    }
58578
private void jComboBoxLineWidthActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxLineWidthActionPerformed
        float lineWidth;
        try {
            lineWidth = Float.parseFloat(jComboBoxLineWidth.getSelectedItem().toString());
        } catch (NumberFormatException ex) {
            lineWidth = 1.0f;
        }
        parent.getGraphPanelChart().getChartSettings().setLineWidth(lineWidth);
        refreshGraphPreview();
    }
274933
private void addJavaFXPropertyToClass(SourceUnit source, AnnotationNode node, ClassNode classNode) {
        for (PropertyNode propertyNode : classNode.getProperties()) {
            FieldNode field = propertyNode.getField();
            // look to see if per-field handlers will catch this one...
            if (hasFXBindableAnnotation(field)
                || ((field.getModifiers() & Modifier.FINAL) != 0)
                || field.isStatic()) {
                // explicitly labeled properties are already handled,
                // don't transform final properties
                // don't transform static properties
                continue;
            }
            createPropertyGetterSetter(classNode, propertyNode);
        }
    }
943788
private void initComponents() {
        setTitle("Validation Framework Test");
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

        // Create content pane
        String notForNimbus;
        if ("Nimbus".equals(UIManager.getLookAndFeel().getName())) {
            notForNimbus = "";
        } else {
            notForNimbus = "related[]";
        }
        JPanel contentPane = new JPanel(new MigLayout("fill, wrap 2", "[]related[grow]", "[]20[]related[]" +
                notForNimbus + "related[]related[]unrelated[]"));
        setContentPane(contentPane);

        JLabel infoLabel = new JLabel("Fill in the fields with less than 10 characters.");
        infoLabel.setForeground(Color.GRAY);
        contentPane.add(infoLabel, "span 2");

        // Input fields
        contentPane.add(new JLabel("Sticker:"));
        textField1 = new JTextField();
        contentPane.add(textField1, "growx");
        contentPane.add(new JLabel("Foreground color:"));
        textField2 = new JTextField();
        contentPane.add(textField2, "growx");
        textField3 = new JTextField();
        if (!notForNimbus.isEmpty()) {
            // Changing the background color of a textfield with the Nimbus is not easy...
            contentPane.add(new JLabel("Background color:"));
            contentPane.add(textField3, "growx");
        }
        contentPane.add(new JLabel("Icon:"));
        textField4 = new JTextField();
        contentPane.add(textField4, "growx");
        contentPane.add(new JLabel("Icon with tooltip:"));
        textField5 = new JTextField();
        contentPane.add(textField5, "growx");

        // Apply button
        applyButton = new JButton("Apply");
        contentPane.add(applyButton, "skip 1, right aligned");

        // Set size
        pack();
        Dimension size = getSize();
        size.width += 100;
        setMinimumSize(size);

        // Set location
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        setLocation((screenSize.width - size.width) / 2, (screenSize.height - size.height) / 3);
    }
508176
public void selectField(ScreenField sfCurrent, int iSelectField)
    {
        ScreenField sField = this.getComponentAfter(sfCurrent, iSelectField);
        if (sField != null)
            sField.requestFocus();
    }
1107547
private String determineComponentViewFileLocation(final FxmlNode fxmlNode) {
        final String rootPath = Try.of(() -> "moe.tristan.easyfxml.fxml.fxml_root_path")
                                   .map(this.environment::getRequiredProperty)
                                   .getOrElse("");

        return rootPath + fxmlNode.getFile().getPath();
    }
1278517
private ParserContext singleBackingTypeParserContext() throws ExpressionCompileException {
    ParserContext context = new ParserContext();
    context.setStrongTyping(true);
    context.addInput("this", backingType);

    PropertyDescriptor[] propertyDescriptors;
    try {
      propertyDescriptors = Introspector.getBeanInfo(backingType).getPropertyDescriptors();
    } catch (IntrospectionException e) {
      throw new ExpressionCompileException("Could not read class " + backingType);
    }

    // read @Visible annotated fields.
    for (Field field : backingType.getDeclaredFields()) {
      if (field.isAnnotationPresent(Visible.class)) {
        context.addInput(field.getName(), field.getType());

        if (!field.getAnnotation(Visible.class).readOnly()) {
          writeableProperties.add(field.getName());
        }
      }
    }

    // read javabean properties -- these override @Visible fields.
    for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
      // skip getClass()
      if (CLASS.equals(propertyDescriptor.getName()))
        continue;

      if (null != propertyDescriptor.getWriteMethod()) {
        writeableProperties.add(propertyDescriptor.getName());
      }

      // if this is a collection, determine its type parameter
      if (Collection.class.isAssignableFrom(propertyDescriptor.getPropertyType())) {

        Type propertyType;
        if (propertyDescriptor.getReadMethod() != null) {
          propertyType = propertyDescriptor.getReadMethod().getGenericReturnType();
        }
        else {
          propertyType = propertyDescriptor.getWriteMethod().getGenericParameterTypes()[0];
        }

        ParameterizedType collectionType = (ParameterizedType) Generics
            .getExactSuperType(propertyType, Collection.class);

        Class<?>[] parameterClasses = new Class[1];
        Type parameterType = collectionType.getActualTypeArguments()[0];
        parameterClasses[0] = Generics.erase(parameterType);
        
        context.addInput(propertyDescriptor.getName(), propertyDescriptor.getPropertyType(), parameterClasses);
      } else {
        context.addInput(propertyDescriptor.getName(), propertyDescriptor.getPropertyType());
      }
    }

    return context;
  }
852340
public final void forVarControl() throws RecognitionException {
		int forVarControl_StartIndex = input.index();

		Token id=null;
		ParserRuleReturnScope variableModifier14 =null;
		ParserRuleReturnScope type15 =null;

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 102) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1073:5: ( ( variableModifier )* type id= Identifier ':' expression )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1073:7: ( variableModifier )* type id= Identifier ':' expression
			{
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1073:7: ( variableModifier )*
			loop138:
			while (true) {
				int alt138=2;
				int LA138_0 = input.LA(1);
				if ( (LA138_0==58||LA138_0==83) ) {
					alt138=1;
				}

				switch (alt138) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1073:9: variableModifier
					{
					pushFollow(FOLLOW_variableModifier_in_forVarControl4678);
					variableModifier14=variableModifier();
					state._fsp--;
					if (state.failed) return;
					if ( state.backtracking==0 ) {
					                VarDecl_stack.peek().descr.updateStart( ((CommonToken)(variableModifier14!=null?(variableModifier14.start):null)).getStartIndex() - 1 );
					                VarDecl_stack.peek().descr.addModifier( (variableModifier14!=null?input.toString(variableModifier14.start,variableModifier14.stop):null) );
					            }
					}
					break;

				default :
					break loop138;
				}
			}

			pushFollow(FOLLOW_type_in_forVarControl4713);
			type15=type();
			state._fsp--;
			if (state.failed) return;
			if ( state.backtracking==0 ) {
			            VarDecl_stack.peek().descr.updateStart( ((CommonToken)(type15!=null?(type15.start):null)).getStartIndex() - 1 );
			            VarDecl_stack.peek().descr.setType( (type15!=null?input.toString(type15.start,type15.stop):null) );
			            VarDecl_stack.peek().descr.setEnd( ((CommonToken)(type15!=null?(type15.stop):null)).getStopIndex() );
			        }
			id=(Token)match(input,Identifier,FOLLOW_Identifier_in_forVarControl4735); if (state.failed) return;
			if ( state.backtracking==0 ) {
			            JavaLocalDeclarationDescr.IdentifierDescr ident = new JavaLocalDeclarationDescr.IdentifierDescr();
			            ident.setIdentifier( (id!=null?id.getText():null) );
			            ident.setStart( ((CommonToken)id).getStartIndex() - 1 );
			            ident.setEnd( ((CommonToken)id).getStopIndex() );
			            VarDecl_stack.peek().descr.addIdentifier( ident );
			        }
			match(input,51,FOLLOW_51_in_forVarControl4756); if (state.failed) return;
			pushFollow(FOLLOW_expression_in_forVarControl4758);
			expression();
			state._fsp--;
			if (state.failed) return;
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 102, forVarControl_StartIndex); }

		}
	}
877690
private void fillWizardPageWithSelectedTypes() {
		final StructuredSelection selection = getSelectedItems();
		if (selection == null) {
			return;
		}
		for (final Iterator<?> iter = selection.iterator(); iter.hasNext();) {
			final Object obj = iter.next();
			if (obj instanceof TypeNameMatch) {
				accessedHistoryItem(obj);
				final TypeNameMatch type = (TypeNameMatch) obj;
				final String qualifiedName = Utilities.getNameWithTypeParameters(type.getType());
				final String message;

				if (addTypeToWizardPage(this.typeWizardPage, qualifiedName)) {
					message = MessageFormat.format(Messages.AbstractSuperTypeSelectionDialog_2,
							TextProcessor.process(qualifiedName, JAVA_ELEMENT_DELIMITERS));
				} else {
					message = MessageFormat.format(Messages.AbstractSuperTypeSelectionDialog_3,
							TextProcessor.process(qualifiedName, JAVA_ELEMENT_DELIMITERS));
				}
				updateStatus(new StatusInfo(IStatus.INFO, message));
			}
		}
	}