[TUTO] Test new ecl command example [message #1467121] |
Sun, 09 November 2014 15:46  |
Eclipse User |
|
|
|
Hello,
I think that hard to create a new ecl command, without understanding eclipse, EMF, eclipse git.
To help you with new create ecl, I present to you, how to use example ecl.
1. Eclipse rcp with plugins
You install eclipse rcp.
(I use version mars, https://www.eclipse.org/downloads/packages/eclipse-rcp-and-rap-developers/marsm2).
1.1 EMF
Once eclipse start, you should add emf. From help -> install New software
You have to select eclipse's version (1).
When the search finished, you unfold "modeling" (2) and select both "EMF - Eclipse Modeling Framework SDK"(3) and "Ecore Diagram Editor (SDK)"(4).

1.2 antlr
Always in "install New software"
You add the repository orbit: http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository/


Select antlr runtime
1.3 egit
You add egit's plugin:
On Eclipse Marketplace (help -> market place), serch egit

2. Telnet client
Then, you should install telnet's client:
Depending on your OS, its installation is different.
This for windows 7: http://windows.microsoft.com/en-us/windows/telnet-faq#1TC=windows-7
and for windows 8.1 http://www.sysprobs.com/install-and-enable-telnet-in-windows-8-use-as-telnet-client
You can to verify its installation, open a command prompt and type "telnet", you will get the correct telnet prompt as below:

3. Rcptt's sources
You create a git clone from rcptt'sources.
To begin, open perspective git (Windows -> Open perspective, Other..., Git)
Clic on "Clone a Git repository" (1).
Then, select "Clone URI" and press "Next".
Enter this address http://git.eclipse.org/gitroot/rcptt/org.eclipse.rcptt.git in URI field (2).
Host and Repository are filed automatically.
Press "Next"(3).
screenshot
In this step "Branch Selection", select "master" branch. And Press "Next".
In step "Local Destination", you must indicate the location of the directory.
And press "Finish".
Eclipse download rcptt's source.
You must obtain this result:

Then, import* rcptt's projects :
org.eclipse.rcptt.ecl.core (1)
org.eclipse.rcptt.ecl.parser (2)
org.eclipse.rcptt.ecl.shell (3)
org.eclipse.rcptt.ecl.telnet.server (4)
org.eclipse.rcptt.ecl.telnet.server.ui (5)
org.eclipse.rcptt.tesla.jface.fragment (6)
org.eclipse.rcptt.tesla.swt.fragment (7)


and import* org.eclipse.rcptt.ecl.example.view

You can switch on "Java perspective" (or "Plug-in Developpement") for this result:
screenshot
*to import a project:
Right clic on project and select "Import Project...".
And press "Next" button and "Finish" button.
4. Test with telnet
You should execute a new instance eclipse to test:
From "Run Configuration" (Run -> Run Configuration).
Create a new "Eclipse Application" (Right clic -> New)
Clic on "Run".
screenshot
Close "Welcome view".
Then, execute "telnet localhost 2323" in command prompt.
Type show-views, the result:
screenshot
And "Enter:"
screenshot
You can try "show-view":
Type "show-view org.eclipse.ui.views.ProblemView"
screenshot
5. Show-views with rcptt
Create a jar file:
Right clic on project "org.eclipse.rcptt.ecl.example.view",
select "Export".
In the tree structure, unfold "Java", select "JAR file" and press "Next" button.
Type "example.rcptt.jar" in "Jar file" field and press "Finish" button.
There may be a warning for the export on manifest. It's not important.
Find your plugin in your eclipse's workspace.
Copy "example.rcptt.jar" in <your AUT>\dropins\plugins\
In rcptt, try this command:
show-views | foreach [val v] { log [format "%s: %s" [$v | get id] [$v | get label]] } //write id and labels into Error log
show-view "org.eclipse.help.ui.HelpView" //open view Help in AUT
FYI, I activated the option "Allocate console" to display the result in console.
The option "Allocate console" is in aut's configuration, in tab "Common".
6. Others information
custom ecl command : https://www.eclipse.org/rcptt/documentation/userguide/ecl/new-command-guide/
[Updated on: Sun, 09 November 2014 16:11] by Moderator
|
|
|
|
|
Re: [TUTO] Test new ecl command example [message #1693322 is a reply to message #1693286] |
Thu, 23 April 2015 04:37  |
Eclipse User |
|
|
|
Hi Guillermo,
Have you re-added your AUT to RCPTT after adding jar file to dropping folder?
You can find a good example of custom ECL command in RCPTT git repo (examples/rcptt.extensions.ecl).
This example shows a sample Maven build, which allows to build an integrated runtime update site for RCPTT IDE in a single Tycho build, and can be used as a starting point for creating custom application-specific commands.
|
|
|
Powered by
FUDForum. Page generated in 0.05781 seconds