Factory method for create a new {@link Fragment}.

@param id
the id
@param markupId
The associated id of the associated markup fragment
@param markupProvider
The component whose markup contains the fragment's markup
@return The new {@link Fragment}.
320795
public static Fragment newFragment(final String id, final String markupId,
		final MarkupContainer markupProvider)
	{
		return newFragment(id, markupId, markupProvider, null);
	}
1085149
public String markdownToHtml(String markdownSource, LinkRenderer linkRenderer) {
        return markdownToHtml(markdownSource.toCharArray(), linkRenderer);
    }
1186820
public static Marker createProvided(Provided provided) {
        requireNonNull(provided);
        return new Marker(Marker.class.getResource("/markers/" + provided.getFilename()), provided.getOffsetX(),
                provided.getOffsetY());
    }
1163213
@Override
	public QueueBrowser createBrowser(Queue queueRef, String messageSelector) throws JMSException
    {
    	return createBrowser(idProvider.createID(), queueRef, messageSelector);
    }
1252525
private void addFragmentToView(final int viewId, final Fragment fragment) {
    fragmentManager.beginTransaction().replace(viewId, fragment).commit();
  }
203551
private void inlineDefinitions(MarkupDocBuilder markupDocBuilder, List<ObjectType> definitions, String uniquePrefix) {
        if (CollectionUtils.isNotEmpty(definitions)) {
            for (ObjectType definition : definitions) {
                addInlineDefinitionTitle(definition.getName(), definition.getUniqueName(), markupDocBuilder);

                List<ObjectType> localDefinitions = new ArrayList<>();
                propertiesTableComponent.apply(markupDocBuilder, new PropertiesTableComponent.Parameters(definition.getProperties(), uniquePrefix, localDefinitions));
                for (ObjectType localDefinition : localDefinitions)
                    inlineDefinitions(markupDocBuilder, Collections.singletonList(localDefinition), localDefinition.getUniqueName());
            }
        }
    }

    /**
     * Builds the type informations of a definition
     *
     * @param markupDocBuilder the docbuilder do use for output
     * @param definitionName   name of the definition to display
     * @param model            model of the definition to display
     * @return a list of inlined types.
     */
    private List<ObjectType> typeSection(MarkupDocBuilder markupDocBuilder, String definitionName, Model model) {
        List<ObjectType> inlineDefinitions = new ArrayList<>();
        Type modelType = ModelUtils.resolveRefType(ModelUtils.getType(model, definitions, definitionsDocumentResolver));

        if (!(modelType instanceof ObjectType) && config.isInlineSchemaEnabled()) {
            modelType = createInlineType(modelType, definitionName, definitionName + " " + "inline", inlineDefinitions);
        }

        if (modelType instanceof ObjectType) {
            ObjectType objectType = (ObjectType) modelType;
            MarkupDocBuilder typeInfos = copyMarkupDocBuilder(markupDocBuilder);
            switch (objectType.getPolymorphism().getNature()) {
                case COMPOSITION:
                    typeInfos.italicText(labels.getLabel(POLYMORPHISM_COLUMN)).textLine(COLON + POLYMORPHISM_NATURE.get(objectType.getPolymorphism().getNature()));
                    break;
                case INHERITANCE:
                    typeInfos.italicText(labels.getLabel(POLYMORPHISM_COLUMN)).textLine(COLON + POLYMORPHISM_NATURE.get(objectType.getPolymorphism().getNature()));
                    typeInfos.italicText(labels.getLabel(POLYMORPHISM_DISCRIMINATOR_COLUMN)).textLine(COLON + objectType.getPolymorphism().getDiscriminator());
                    break;
                case NONE:
                    if (ALWAYS_DISPLAY_DISCRIMINATOR && isNotBlank(objectType.getPolymorphism().getDiscriminator()))
                        typeInfos.italicText(labels.getLabel(POLYMORPHISM_DISCRIMINATOR_COLUMN)).textLine(COLON + objectType.getPolymorphism().getDiscriminator());
                    break;
                default:
                    break;
            }

            String typeInfosString = typeInfos.toString();
            if (isNotBlank(typeInfosString))
                markupDocBuilder.paragraph(typeInfosString, true);

            Map<String, Property> properties = ((ObjectType) modelType).getProperties();
            if (!properties.isEmpty()) {
                propertiesTableComponent.apply(markupDocBuilder,
                        PropertiesTableComponent.parameters(
                                properties,
                                definitionName,
                                inlineDefinitions));
            }
        } else if (modelType != null) {
            MarkupDocBuilder typeInfos = copyMarkupDocBuilder(markupDocBuilder);
            typeInfos.italicText(labels.getLabel(TYPE_COLUMN)).textLine(COLON + modelType.displaySchema(markupDocBuilder));

            markupDocBuilder.paragraph(typeInfos.toString());
        }

        return inlineDefinitions;
    }

    /**
     * Apply extension context to all DefinitionsContentExtension
     *
     * @param context context
     */
    private void applyDefinitionsDocumentExtension(DefinitionsDocumentExtension.Context context) {
        extensionRegistry.getDefinitionsDocumentExtensions().forEach(extension -> extension.apply(context));
    }

    public static class Parameters {
        private final String definitionName;
        private final Model model;
        private final int titleLevel;

        public Parameters(String definitionName,
                          Model model,
                          int titleLevel) {
            this.definitionName = Validate.notBlank(definitionName, "DefinitionName must not be empty");
            this.model = Validate.notNull(model, "Model must not be null");
            this.titleLevel = titleLevel;
        }
    }


}
224982
function(html, element) {
      var template = document.createElement('template');
      template.innerHTML = html;
      var fragment = this.instanceTemplate(template);
      if (element) {
        element.textContent = '';
        element.appendChild(fragment);
      }
      return fragment;
    }
733025
@SuppressWarnings("unchecked") // we know that the returning fragment is child of fragment.
    public static <F extends android.support.v4.app.Fragment> F supportFindFragmentById(android.support.v4.app.FragmentManager manager, int id) {
        return (F) manager.findFragmentById(id);
    }
775242
public static <T> CheckGroupSelector newCheckGroupSelector(final String id)
	{
		final CheckGroupSelector checkGroupSelector = new CheckGroupSelector(id);
		checkGroupSelector.setOutputMarkupId(true);
		return checkGroupSelector;
	}
500496
public static MarkedElement markupAtom(IRenderingElement elem, IAtom atom) {
        if (elem == null)
            return null;
        MarkedElement tagElem = markupChemObj(elem, atom);
        tagElem.aggClass("atom");
        return tagElem;
    }
1275766
public static <F extends Fragment> FragmentBundler<F> create(F fragment) {
    return new FragmentBundler<F>(fragment);
  }
603042
public static <T> MultiLineLabel newMultiLineLabel(final String id, final IModel<T> model)
	{
		final MultiLineLabel multiLineLabel = new MultiLineLabel(id, model);
		multiLineLabel.setOutputMarkupId(true);
		return multiLineLabel;
	}
626810
public static MenuItemTransitionBuilder transit(String id, @IdRes int menuId, @NonNull Toolbar toolbar) {
        return new MenuItemTransitionBuilder(id, menuId, toolbar);
    }
615634
public static Label newLabel(final String id, final String label)
	{
		return ComponentFactory.newLabel(id, Model.of(label));
	}
1140049
@Override
	public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
		// Create a new view.
		View v = LayoutInflater.from(viewGroup.getContext())
				.inflate(R.layout.rv_card, viewGroup, false);
		ViewHolder viewHolder = new ViewHolder(v);

		v.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				int itemPosition = viewHolder.getAdapterPosition();

				RecyclerAdapter.this.getJarr();
				String id = jarr.get(itemPosition).asJsonObject().getString("id");
				Log.d(TAG, "Element " + itemPosition + " clicked. with id : " + id);
				MyJus.intructablesApi().info(id);
				Fragment prevFragment = ((MainActivity) v.getContext())
						.getSupportFragmentManager().findFragmentById(R.id.container);
				Fragment fragment = DetailFragment.newInstance();
				((MainActivity) v.getContext()).getSupportFragmentManager()
						.beginTransaction()
						.hide(prevFragment).add(R.id.container, fragment).addToBackStack(null)
						.commit();
			}
		});

		return viewHolder;
	}
185706
public void createPlugin(String id, String version) {
        descriptor = new GoPluginDescriptor(id, version, about, pluginJarFileLocation, pluginBundleLocation, isBundledPlugin);
    }
784056
public TileBasedLayer createLayer(String id, TileConfiguration conf, final TileRenderer tileRenderer) {
		return new AbstractTileBasedLayer(id, conf) {
			@Override
			public TileRenderer getTileRenderer() {
				return tileRenderer;
			}
		};
	}