The instructions below are obsolete, see BuildTriquetrumFromTheEclipseRepo (December, 2015)
Soon, we will do an initial drop of Triquetrum for the Eclipse Foundation to check out the IP. (November, 2015)
Here's how to build what we have so far:
Check Out the Repo
Either run the command from the command line
git clone https://github.com/erwindl0/triquetrum.git
Or use Eclipse:
- Window -> Show View -> Other -> Git ->Git Repository
- Click on Clone Repository
- Enter the URI
https://github.com/erwindl0/triquetrum.git
- Keep the Master Branch
- Select Finish
Importing Projects
If you checked out Eclipse from the command line, then in Eclipse, right click on the Package Explorer tab and select Import.
If you checked out the Git repo from within Eclipse, then in the Git Repositories tab, expand the triquetrum tab, right click on Working Directory and select Import Projects.
Keep Import existing projects selected, click Next then Finish.
Building
The build will show lots of errors. Don't panic.
- Expand org.eclipse.triquetrum.target.platform and click on
triq.target
Attach:ErwinTreeTriqTarget1.png Δ
- The target will build Not sure of the terminology. See the bottom right for the status. It may take a minute or two to build.
- In trig.target tab, Target Definition pane, click on Set as Target Platform.
Attach:ErwinTreeSetTargetAsPlatform.png Δ
- Under org.eclipse.triquetrum.workflow.editor, click on Triquetrum.product
Attach:ErwinTreeTriquetrumProduct.png Δ
- In the Triquetrum.product tab, click on the validate icon in the upper right. The icon looks like a lined piece of paper with an check mark.
Attach:ErwinTreeValidate.png Δ
A dialog indicating that no problems were detected should come up.
- In the Triquetrum.product pane, Overview tab, under Testing, click on Launch an Eclipse Application. The application should start up.
Under Mac OS X, if the application does not start up, see NoClassDefFoundError: org/eclipse/swt/SWTError for a possible solution.
Running
The Eclipse Application may show a welcome window, which you can close.
You will then see a fresh Triquetrum window:
Attach:ErwinTreeTriqFirstWindow.png Δ
Create a Workspace
Triquetrum is based on a workspace model for projects, so first we create a workspace:
- Right click on the Project Explorer tab
- Select New -> Project -> General -> Project
Attach:ErwinTreeNewProject.png Δ
- Click on Next
- Enter the name of your workspace. We chose
myWorkspace
.
- Click on Finish
- Your workspace will appear in the Package Explorer tab
Create a Workflow
The next step is to create a workflow:
- In the Package Explorer, right click on the newly created workspace
- Select New -> Other
Attach:ErwinTreeTriqNewOther.png Δ
- In the Select a wizard dialog, open Worflows and select Triquetrum workflow model
Attach:ErwinTreeTriqNewWorkflow.png Δ
- Click on Next
- In the Diagram window, select the Diagram type of Triquetrum workflow (you may need to double click on Triquetrum workflow)
- In Triquetrum, a tab called newDiagram should appear:
Attach:ErwinTreeTriqNewDiagram.png Δ
Build and Run A Model
- Drag a Const, Discard and SDF director from the right side into the newDiagram pane:
Attach:ErwinTreeTriqSimpleModel.png Δ
- Save the model
- Click the green run arrow in the upper left tool bar
- Look in the Console tab of the Eclipse that was used to launch Triquetrum. You should see lines that have the state of the ptolemy.actor.Manager, starting with
STARTING
:
2015-11-25 14:39:54,730 INFO [pool-1-thread-1] executor.WorkflowExecutionTask (call:124) - Context 8467d411-396c-428e-9f29-3b5b76236064 - Starting execution of model newDiagram
2015-11-25 14:39:54,730 INFO [pool-1-thread-1] executor.WorkflowExecutionTask (managerStateChanged:275) - Context 8467d411-396c-428e-9f29-3b5b76236064 - Execution state change of model newDiagram : STARTING
2015-11-25 14:39:54,749 INFO [pool-1-thread-1] executor.WorkflowExecutionTask (managerStateChanged:275) - Context 8467d411-396c-428e-9f29-3b5b76236064 - Execution state change of model newDiagram : ACTIVE
2015-11-25 14:39:54,750 INFO [pool-1-thread-1] executor.WorkflowExecutionTask (managerStateChanged:275) - Context 8467d411-396c-428e-9f29-3b5b76236064 - Execution state change of model newDiagram : STOPPING
2015-11-25 14:39:54,750 INFO [pool-1-thread-1] executor.WorkflowExecutionTask (managerStateChanged:275) - Context 8467d411-396c-428e-9f29-3b5b76236064 - Execution state change of model newDiagram : IDLE
21 ms. Memory: 570368K Free: 473118K (83%)
2015-11-25 14:39:54,751 INFO [pool-1-thread-1] executor.WorkflowExecutionTask (executionFinished:248) - Context 8467d411-396c-428e-9f29-3b5b76236064 - Execution finished of model newDiagram
FIXME: There seems to be a delay between when I first run the model and when the output occurs?
Editing
- To change the name of an actor, highlight the actor name in the model and type in a new name
- To change a parameter, double click on the actor and select the parameter:
Attach:ErwinTreeTriqEditParameters.png Δ
FIXME: The values are not yet actually stored.
Problems
NoClassDefFoundError: org/eclipse/swt/SWTError
While starting the Eclipse Application, an error appeared in the console
Caused by: java.lang.NoClassDefFoundError: org/eclipse/swt/SWTError
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
The solution is to:
- In the Triquetrum.product pane, click on the Dependencies tab
- In the Plug-in Selection window, enter
*.eclipse.swt
, select org.eclipse.swt.cocoa.macosx.x86_64
, then click on OK