SWT Browser widget with Eclipse 4 RCP application - browser

Please help to get started with Eclipse 4 RCP.
Set task is to create simple application with imbedded browser (using SWT Browser widget)
This Lars Vogel's Eclipse 4 RCP tutorial is used.
Created application is on GitHub. Now I want to add SWT browser widget.
I added class.
Unsurprisingly, now application doesn't start:
Added class seems quite of different nature. Seems I am missing some points about Eclipse 4 and SWT connection.
I have read the basics about Eclipse RCP before.
Here are docs: http://www.eclipse.org/swt/widgets/ and JavaDoc, but they don't explain.
Where should be my next steps to? What to read?

ViewPart is only used in Eclipse 3 RCP. Instead your part class should 1) be connected to the application model, as described in Vogella's tutorial; 2) create controls in a method annotated with #PostConstruct, with a signature like public void createControls(Composite parent). His example in Section 17.2 even contains a Browser, but it doesn't matter which SWT widgets you want to use: the process is the same.
You can't expect to find anything about RCP in SWT documentation! Look at the RCP documentation instead.
I have read the basics about Eclipse RCP before.
Try to forget them, they likely will just confuse you. Eclipse 4 RCP does very many things differently. Of course, SWT and JFace haven't changed, so you can still use what you read about them.

Related

XPAGES AND ONEUI REFERENCE

I would like to know if you can import the interface used for XPages (oneui) inside the application without the need to have to referencing the server or extend it.
Thank you
Since 8.5.3 OneUI has been delivered via an OSGi plugin on the server. Most modern XPages applications are being built using bootstrap look and feel instead, which is again in the OSGi plugin for XPages Extension Library on OpenNTF. IBM have also moved away from OneUI for IBM Verse and for responsive XPages have adopted bootstrap. I'm not aware of anyone who has tried to pull those into an NSF, and I would not advise it. You may hit Java security exceptions with some of the code, mapping between resources may not work, and there are an immense number of Java classes and other resources. And if you do hit any issues, you are unlikely to find much help to solve them.

Web based Oracle Scene Builder analog

I want to provide an ability to create simple java and javafx applications to the users on my website. I've found excellent code editor (Ace) but I don't know how to provide FXML design tool to the Web users.
Is there any options?
ADD I want the users to use this interface builder without any additional requirements like Java 8 or something
How to host SceneBuilder in a web page (requires Java 8):
Build SceneBuilder from it's source.
Package it as a Browser Embedded Application.
Host your packaged application on the Internet and direct web users to its URL.
Other than using a fork of SceneBuilder for your project, I don't know of any other feasible way to provide visual FXML editing capabilities. I would certainly not recommend trying to create from scratch your own FXML visual editor written in either Java or JavaScript.

Implementing dialogs from resource

I'm currently trying to port an application from owl to vcl.
In my old projekt-file I was able to load dialogs with something like
TBatchAcDialog(TWindow* parent) : TAPDialog(parent, BATCH_DIALOG)
However, using TTaskDialog instead it doesn't support the second argument.
I have found an explanation for the user interface designer that when rightclicking on a menu you can load the first declared menu from a rc-file.
However, I don't really know how to load those dialogs as dialogs in this IDE and linking them to my classes again.
Does anyone of you know about this or could link me to an article about a similar problem? I seem to have failed finding a proper solution although implementing rc-dialogs seems to be a common problem to me.
I'm currently trying to port an application from owl to vcl.
What is your exact goal? To be able to build the application with C++ Builder, or to use VCL instead of OWL?
If you want to use VCL for the dialogs, then you cannot port them, you need to rewrite all the UI from scratch, as VCL is very different from the standard Windows dialogs.
If you want just to build the application with C++ Builder, then you can do so by upgrading to OWLNext - it is an open-source upgrade for the OWL framework and works with the modern compilers like C++ Builder and Visual C++.
You can also use OWLNext for a gradual migration to VCL - as VCL and OWL can co-exist in the same application, so you can migrate your old OWL application to C++ Builder, write any new UI in VCL, and gradually rewrite the old UI in VCL - it might be easier and safer than rewriting the whole application with VCL.
C++Builder does not have any native functionality that wraps resource dialogs in classes. You have to set that up manually in your own code if you need it. Otherwise, just use Win32 API functions like CreateDialog() when working with resource dialogs, or else redesign your UI to make use of VCL TForm windows instead of resource dialogs.
TTaskDialog is not what you think it is. It is just a wrapper for the Win32 API TaskDialogIndirect() function (Vista and later only), which is not related to what you are attempting to accomplish.

New JavaFx library

I am using Netbeans 7.2 and JavaFX 2.1. I want to make a library mycompany.utils.sysuser to maintain login information. This library can be used in many different app, with a JavaFX dialog for login/logoff/change password.
I don't know how to begin, a regular Java library or a new JavaFX FXML application?
It doesn't really matter. The JavaFX project might generate some extra code and build tasks which you might or might not need but you can remove them if you need to or leave them be. JavaFX is just another library so you're also OK with a java project, just add JavaFX as a dependency.
It is complete overkill and confusing IMO to have a project for FXML and a project for the java files.

Running C# app inside browser as a plugin

I have a small 2D game engine written in C#, using DirectX. Is it possible to somehow run it in a browser as a plugin? Like for example Flash and others, where you go to a site with a game and it will ask you to install a certain plugin and then you can play the game in the browser, with mouse and keyboard input.
I have searched around for hours and I still don't know what I'm looking for. I have so far primarily focused on Internet Explorer, but there are plugins, addons, extensions, etc I don't know what I need really.
Yes I think it is possible.
For example, I have an HTML page which includes an element like this:
<object id="simpleControl1"
classid="http:RenderTextProject5.dll#RenderTextProject.ScrollableControl"
height="300"
width="300">
</object>
The 'classid' attribute value has the following meaning/syntax:
RenderTextProject5.dll is the filename of a compiled .NET assembly
RenderTextProject.ScrollableControl is the qualified name (namespace plus classname) of a class which subclasses System.Windows.Forms.Control
I can then see the control being rendered in the browser.
I'm using IE (IE8, but it used to work with IE6 too), and I have the .NET framework installed on my machine (but I think I needn't have the RenderTextProject5 assembly installed on the client machine).
There may be some other caveats too (e.g. I needed to run in the Intranet security zone).
See Return of the Rich Client: Code Access Security and Distribution Features in .NET Enhance Client-Side Apps.
Look for Silverlight.. It is maybe not exactly what you need but it is a browser plugin capable of running C# code ;)
There is a relatively new plugin called Unity. It is a bit more complex, as it is a dev/3D authoring environment on its own, but uses C# as its language as far as I know. However I don't know if pure 2D programming is possible (well, may be worked around using ortho 3d?).
The basic version is free to download recently, maybe worth a check.
It is possible to run C# applications in a web browser without using plugins. For example, C# applications can be compiled into JavaScript applications using JSIL.

Resources