Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » intellij - how to create or import project
intellij - how to create or import project [message #1830641] Thu, 30 July 2020 11:22 Go to next message
Mr Robot is currently offline Mr RobotFriend
Messages: 69
Registered: March 2020
Member
Hello,

please can someone tell me how to create new project using intellij or import existing project?

Thanks
Re: intellij - how to create or import project [message #1830871 is a reply to message #1830641] Wed, 05 August 2020 15:19 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio GuglielmoFriend
Messages: 255
Registered: March 2010
Senior Member
Hi

The easiest way at the moment is to use Eclipse to create the project and import it into IntelliJ. You could also create it using the Maven archetype on command line or using the archetype wizard in IntelliJ, but this requires a few more steps.

Let me show you the way using Eclipse first.

1. Create a project in Eclipse (with default settings).
2. Close Eclipse, Open IntelliJ
3. Select File, Open.
4. Select the root folder of the generated project (helloworld).
index.php/fa/38734/0/
5. Ensure all modules are correctly added as maven projects. The name of the text needs to be bold, if the color is lighter (which probably is the case for helloworld.server.app.dev and helloworld.ui.html.app.dev), execute right click, Add as Maven Project
index.php/fa/38735/0/
6. Run npm install on the package.json in helloworld.ui.html. You can do this on command line or right click, npm install.
index.php/fa/38736/0/
7. Start the watcher to build the JavaScript sources. You can do this on command line or open the package.json and click on the play icon on line 21.
index.php/fa/38737/0/
8. Convert the eclipse launch files into IntelliJ Run Configurations. You can do this easily with the IntelliJ plugin called Eclipser. Just install it using File, Settings, Plugins first. And then right click on the launch files and run "Convert with Eclipser". Do this for [webapp] dev ui.launch and [webapp] dev server.launch
index.php/fa/38738/0/
9. Run server and client using the generated run configurations on the top right corner of IntelliJ
10. Open http://localhost:8082/ in the browser :)
Re: intellij - how to create or import project [message #1830872 is a reply to message #1830871] Wed, 05 August 2020 15:34 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio GuglielmoFriend
Messages: 255
Registered: March 2010
Senior Member
If you don't want to use Eclipse, you can create the project from command line. Execute the following command:

mvn archetype:generate -B -DarchetypeGroupId=org.eclipse.scout.archetypes -DarchetypeArtifactId=scout-helloworld-app -DarchetypeVersion=10.0.21 -DgroupId=com.myapp -DartifactId=helloworld -Dversion=1.0.0-SNAPSHOT -Dpackage=com.myapp.helloworld -DdisplayName=HelloScout -DjavaVersion=1.8 -DsimpleArtifactName=helloworld

And then do the above steps to import it into IntelliJ.

Additionally you need to create a public/private key pair and insert them into your config.properties, otherwise the app won't start.
Therefore, open the class SecurityUtility (Ctrl+N) and run its main method (right click, Run SecurityUtility.main). Set the module helloworld.server in the field "Use classpath of module" and click ok.
index.php/fa/38739/0/

Now replace the TODO markers in the config.properties with the generated private and public keys.
index.php/fa/38740/0/

Now you should be able to run the application in the same way as explained above.

[Updated on: Wed, 05 August 2020 15:36]

Report message to a moderator

Re: intellij - how to create or import project [message #1830875 is a reply to message #1830872] Wed, 05 August 2020 15:58 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio GuglielmoFriend
Messages: 255
Registered: March 2010
Senior Member
The third way is to create a new maven project using archetype with IntelliJ, but I don't recommend to do it at the moment because you can not specify the simpleArtifactName which is used to name some JS and Less files and for the JavaScript namespace.

But if you want to try it, follow these steps:
1. Select File, new project.
2. Choose Maven
3. Click create from archetype and then "Add Archetype"
4. Fill the fields in the following way:
index.php/fa/38741/0/

5. Click next and insert the properties for your project. Make sure to use a version with 3 digits or change the version in the package.json afterwards. 1.0-SNAPSHOT is not a valid version for npm, you need 3 digits. You could use 1.0-SNAPSHOT for the maven projects (pom.xml) and 1.0.0-snapshot for the npm project (package.json).
index.php/fa/38742/0/

6. Change the names of the JS and Less files and rename the namespace (name.js, name-theme.less etc.)
index.php/fa/38743/0/

7. Have fun :-)

BTW: Install the Eclipse Scout plugin to get some Scout SDK support (NLS editor, code completion for Scout fields etc.).
Re: intellij - how to create or import project [message #1839174 is a reply to message #1830875] Tue, 16 March 2021 16:31 Go to previous messageGo to next message
Luka Cavic is currently offline Luka CavicFriend
Messages: 47
Registered: August 2014
Member
Hello, I managed to setup project. But, how do I create new Form or LookupCall?
Ecliose generates all, FormData, IService, Service... How to do it on IntelliJ, or that is not implemented jet?
Re: intellij - how to create or import project [message #1839215 is a reply to message #1839174] Wed, 17 March 2021 15:53 Go to previous message
Claudio Guglielmo is currently offline Claudio GuglielmoFriend
Messages: 255
Registered: March 2010
Senior Member
Hi Luka,

you can add certain Scout elements like form fields or menus directly in the editor by typing or pressing ctrl + space. FormData and PageData objects are created automatically.
The creation of forms or pages is not supported yet, but it is in development. I expect it to be released within the next few months.

BTW: the creation of a new Scout project in IntelliJ got a lot easier with the latest Scout release. Have a look at the Release Notes.
Previous Topic:How BSI handles deployment
Next Topic:SearchOutline : Display result nodes in the left pane
Goto Forum:
  


Current Time: Sun Mar 03 00:34:37 GMT 2024

Powered by FUDForum. Page generated in 0.02298 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top