I have a Java application which uses Sirius to model some nodes and diagrams.
I have two questions:
1. How I can export these diagrams as an XML/JSON? Is it possible to export some nodes of the diagram only? Please see the attached screenshot. For example, I want to export the node "DataRetentionPeriod" as a JSON. What is the required code and where I should insert it?
2. Can I use Post and Get commands of Liferay to export a diagram or some nodes of the Sirius files. I know that by right clicking on the modelling editor of the Sirius file I can export the diagram as an image. Can I add an option, similar to export an image, to export or call another function which can create endpoints or connection to a database? see the attach screenshot please.
The diagram is already an XML file (or more precisely, an XMI). Open the .aird file with any text editor. Note that the aird represents only the "drawing" element while you may be interested in the underlying "semantic" element (usually an XMI model conforming to your Ecore metamodel). https://www.eclipse.org/sirius/doc/ may help
You want to have a look at Eclipse Commands which allow you to enhance your RCP application with additional menus, menu entries, etc. Vogella.com has a lot of tutorials about this that should help you. Then you can do any behavior, like transforming a model element in an appropriate JSON and upload it to your database.
Related
I searched in internet for wizard with many steps or many pages but couldn't find a good one.
Basically looking for a wizard with many levels (atleast 6) example: http://www.java2s.com/Code/Java/Swing-Components/DynamicWizardDialog.htm
could someone help me with a good example or snippet to build a good wizard for providing the user to create configurations required for the application?
example,
Level 1. DB connection details
Level 2. FTP server details
Level 3. Directory Mapping details
Level 4. Third Party Server details
...
...
Also, i would like to save each level to each configuration file or appending to a single configuration xml for further modifications.
Please help me with your thoughts/suggestions.
For the dialogs look at this link: http://code.makery.ch/blog/javafx-dialogs-official/
And you want to Save configurations, well there are a number of options. You could make a class which Contains configuration settings and serialise, or you could export settings to a file (xml, normal text, etc) when the configuration might get changed externally from the program use xml or a text file
I am working on a project in netbeans, and right now I want to embed links to various pdf files so that when that link is clicked, the program will call up the appropriate pdf in it or somewhere in the hard disk and open it with the pdf viewer.
I came across a 'clickable label' concept in one article, but I dont know how to do that, all the labels I insert do not link to the source tab when I double click on them.
Can someone please provide an example of how to implement a 'clickable label'?
I'm asked to develop an automated mail alert in Lotus notes using Java.
The hard part is that the mail content will be tables and each table will be placed inside a tab. I used richtext programming to create tabs first and then iterated each tab, inserted a table and then inserted data into the table.
The problem I face is when I try to format the tables inside the tabs. For example, O need to apply different colors to each column of the table which I couldn't. Let me know if there is any other way to generate the automated email.
I use Eclipse IDE and back end is Oracle 11g. The following link is where I got the idea of how to insert a table and tabbed table: http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp?topic=%2Fcom.ibm.designer.domino.main.doc%2FH_APPENDTABLE_METHOD_RTITEM_JAVA.html
The Note Java classes offer pretty limited functionality for formatting tables. If you want more control, the easiest option would bue the Midas Rich Text LSX from Genii Software, however that is commercial software and it is generally used in LotusScript. Off the top if my head, I don't know if it's supported for Java.
Another option is to use DXL. What I would probably do is manually create an email containing a table with the exact look and feel that I want, export that email to DXL, and then write my code to insert my data into the DXL and then import the DXL into the document that I'm mailing.
IMHO the pragmatic way is to use HTML and MIME, and prepare the tables and tabs using hHTML and the NotesMime classes. Here's a link: http://www-01.ibm.com/support/docview.wss?uid=swg21098323
Why not use the Java interface in Notes to pull information into that environment rather than push the information/format into Notes? The Notes designer is Eclipse based. Plus with the recent changes in Notes external db access is simplified.
I am just trying to think a different direction but still using Java. The Notes side might be faster for you.
I am using JavaFx-2.I need to view the pdf file in JavaFx. I searched in Google and found the below link.
http://www.idrsolutions.com/jpedalfx-viewer/
In this link I have created every thing whatever mentioned there and I am able to see PdfHelpPanel in Palette. When I drag this component to the PDFHelpFrame I am able to see the fileLocations property. Here I need to give the file locations but I don't know how to give the location of my pdf file. When I click browse in filelocations property it is asking for Custom Code, Default Editor, value from existing component. Which one I need to select. I am struck up exactly at
http://netbeans.dzone.com/articles/how-create-import-a-javabean-c-0
second image from last. If any one has done this already can you help me?
You can use this project https://github.com/james-d/PdfViewer
It uses PDFRenderer library.
Motivation
I have written an eclipse plugin that shows me a list of all files and folders with unreviewed content. When selecting a folder, I want an editor to open showing all files and subfolders that this folder contains. It has to work for versioned items, too. So I have to create the content of the editor within my plugin (no backing IResource).
What I currently have
Right now I'm opening a RemoteFileEditorInput for a versioned file (subclipse) or I'm using IWorkbenchPage.openEditor() for a FileEditorInput.
Question
What's an easy way to visualize dynamic content (directory listing) inside of an text editor?
EDIT 2010-04-13:
More Context
I want to be able to create some code review comments on a directory listing. For this I want to be able to open a diff viewer to see which elements were removed or added between two revisions of the directory.
I'd like to enter a comment for a directory the same way I do for a text file. That's why I try to display the directory content as a text file - I've already implemented the mechanisms for commenting a text file.
I call the content of the directory editor "dynamic", because it's not really backed by an existing directory in the filesystem. For older versions of a directory I will create the editor content within my program code.
I'm afraid I don't totally understand your question (and I lack the rep to comment on it).
Is this right?: You want to be able to open one of three editors in support of your goal:
An editor for unversioned files (you say you have this)
An editor for versioned files (you say you have this)
An editor for directories (this is what you need?)
What does the user do here? What does it look like?
I'm confused by "What's an easy way to visualize dynamic content (directory listing) inside of an text editor?"
Knowing that I probably completely miss your point, I would note that your editor can contain whatever controls you want it to (cf. some of the "forms" editors in PDE, like for editing a plug-in manifest) - you'd probably extend EditorPart, maybe create a ManagedForm in your createPartControl(), create a ListViewer, TableViewer, or TreeViewer in there, give it an appropriate content provider, and give it an appropriate label provider.
I'm also confused by "What's an easy way to visualize dynamic content (directory listing) inside of an text editor?"
I can only assume that you want to somehow poll or listen to some events and tell your viewer to update() or refresh().
Finally I would question whether the directory listing really belongs in an editor . . . most navigation happens in views. Will the user actually be performing edits to the directory somehow, and possibly "saving" them at some later time?
I hope this helps us all narrow down into whatever will help you.