Browse SAPUI5 source code - sapui5

I require some information about the SAPUI5 core libraries. I want to read the source code of a particular control, for example sap.m.InputBase. Where can I find the source for this control? I googled it and found it's in the "InputBase.js" file but what steps do I need to follow to see the source code for this file?
Is there a way I can scroll through the controls in the sap.m library and then read the source code for the control?

OpenUI5
Most of the SAPUI5's libraries, which are opensource, can be browsed on GitHub. You can even browse different releases by selecting the respective branch:
Here is an example of InputBase from 1.48.
Or filter by filename.
SAPUI5
Some libraries aren't included in OpenUI5, such as:
sap.ui.comp
sap.ushell
sap.gantt
sap.viz
sap.ui.richtexteditor
In this case, download one of the SAPUI5 packages from here: https://tools.hana.ondemand.com/#sapui5 (Scroll down to "SAPUI5 Runtime"). This also allows us to browse the whole UI5 libraries offline without having to run the app.

it's to distinguish between openui5 and sapui5. openui5 is the open source clone of sapui5. openu5 is free to use. sapui5 is not. openui5 doesn't contain all controls that sapui5 contains. but openui5 contains all the important basic controls. the controls that are in sapui5 included but not in openui5 are controls like charts and smart contorls that e.g. are automatically configured by odata annotations.
find the source code for the most controls of sapui5 and all controls of openui5 in its github repository here. e.g. find the source code for the inputbase control in its github repository here.
find the source code of sapui5 or openui5 which is used by a sapui5 or openui5 application through the use of a debugger tool of a browsers on this sapui5 or openui5 application. e.g. to invoke the debugger tool of the chrome browser please press ctrl + shift + i.
find also the source code for the most controls of sapui5 and all controls of openui5 at the openui5 website here in the downloadable runtime and sdk packages of openui5.
find also the source code for the controls of sapui5 and openui5 the sap development website here in the downloadable runtime and sdk packages of sapui5.

Related

VSCode extension's API: JS contribution point

I am developing a VS Code extension that offers auto completion and hover information about my custom web components library.
I am using Custom Data Extension API to do that, but I have found that the only allowed contribution point are HTML and CSS, and that's a problem for me as I want to make my extension work in JSX files that uses my components in their React version (for instance: <MyComponent> instead of <my-component>)
I have not been able to find if this is possible, or so far, it seems not to be.
Any idea if this is supported by the current VSCode API?
Originally answered by Simon Chan on Github
Usually providing completions for JSX is by writing a TypeScript definition file. The documentation is at https://www.typescriptlang.org/docs/handbook/jsx.html#intrinsic-elements
This file is usually distributed in an NPM package. I can't remember the rule for loading ambient definitions #mjbvz. Maybe it must be a #types/X package, otherwise the user has to edit their tsconfig.json or adding a /// <reference in their source files.
If you want to go the hard way by creating a plugin for TypeScript server that provides custom completions, I can only say it's not impossible. The related contribution point is typescriptServerPlugins: https://code.visualstudio.com/api/references/contribution-points#contributes.typescriptServerPlugins.

What are the steps to create and use custom themes in OpenUI5 without SAP license?

I am looking for steps (end to end) on how to create and use custom theme in custom OpenUI5 apps.
I have looked at the OpenUI5 code in GitHub and it is still a bit not clear for me as far as the end to end process goes.
Here's what I have understood so far
Each control has its own *.less file for each theme and there is base.less with the color definitions.
A grunt task loops through the LESS files and generates one common library.css for each library (sap.ui.core, sap.m, etc..)
Add the CSS in the resources folder as shown here
Is this correct, or am I missing a way to create custom themes without any SAP software license?
I think the "UI Theme Designer" needs SAP software to be installed. I am looking for something not linked with the SAP environment.

How define the my OpenUI5 application by a graphic editor

I'm a OpenUI5 developer. I create easily new applications, but I I have to use a code approach (XMLview - in my case - js or json).
Could you suggest an alternative mode to create a interface? (like android or iOS editor - drag&drop - to realize my pages)
I'm not sure what significance you are placing on the "Open" part of "OpenUI5", but you may or may not be aware of SAP's Rapid Developer Environment aka RDE. There are visual design tools for the view parts of UI5 apps. You could possibly use that and then export the results.

combine GWT application from several modules (JARs or OSGI bundles)

I need a web UI with pages like "Info", "Support", etc. That's easy.
In addition, I have some "plugins" with their own "editors", which need to be shown in the same web UI.
It's something similar to "Extensions" page shown in Google Chrome: every extension has an "Options" link, which can contain any editor the extension wants.
So, my main application does not know upfront how many "plugins" and editors it has. All it knows is how to call the plugin's "showEditor()" method.
(this is how it's currently implemented in my Eclipse-based desktop app, which I'm trying to port to web)
I'm wondering if GWT is applicable for this kind of applications. So far looks that GWT applications are "monolithic" and all pages / panels need to be referenced in the common "gwt.xml" file, which means I can't configure the distributive to include only "core plus plugin1 and plugin2" or only "core plus plugin 2 and plugin 3" - I have to always include everything since it's referenced in the common xml file.
there's no requirement to install/update additional plugins AFTER the application is built and installed - this should make the task easier.
Any ideas how to use "modularity" with GWT so that UI panels can come from several "modules/plugins"?

callback dock demo in Miglayout

can anyone suggest where i can get a hold of the source code for the callback dock demo application in Miglayout site. such a tutorial would also be ok. thanks.
There are quite a few broken links to where the source used to be. Now the demos are distributed with the MiG Layout source.
Go to http://www.miglayout.com/
Follow the link under MiGLayout Downloads to the Downloads Folder.
Choose the latest version, and download the jar that includes "sources" in the name. For instance, miglayout-3.7.2-sources.jar
Expand the jar file and locate the folder called demo, which includes a Java file for each of the demos.
Near the bottom of the MiG Layout page there is also a link to their support forums that look fairly active.