Is it possible to read and parse graphiti diagram file in standalone app? - eclipse

I am doing some research before putting my hand on a project.i need to implement an app that needs to read a diagram file generated by graphiti and parse the file as a standalone app without running in eclipse as plugin.
As I understand , graphiti is a plugin in eclipse,so lots of things are inited by eclipse , so is it possible? Could u plz point me to the right place?
Thanks

Looks like Graphiti needs an OSGI environment to operate. It is possible to read a diagram file in a standlone OSGI app without bringing up the UI. I have some sample code here that starts an OSGI app and reads a diagram file. I guess the question is what you'd want to do with that diagram once the file is read - if your intention is to export that diagram to an image then you'd need the UI (an RCP app could do the trick) - sample code is here which relies on a fix (eclipse bug id 423018) that just landed in graphiti 0.13.x

Related

Eclipse RCP Obfuscation

I have built a Eclipse RCP Application and packaged with Maven/Tycho and everything works fine. Now, I want to protect my code and want to obfuscate it.
Here are the list of questions :-
Which free tool to use for Obfuscating RCP application?? I tried
Proguard, but stuck with the configuration file and not able to run
Obfuscation. Unfortunately, I dont have sample Eclipse RCP Proguard
Config file.
When should the obfuscation be done?? After the
complete Maven Install of application or when the application is
packaging.
I have tried all possible Google solutions but in vein. Appreciate if any one could be of help.
Regards,
SDS.
Which free tool to use for Obfuscating RCP application
There are some existing plugins you can search in marketplace which help in Obfuscating for example:
https://marketplace.eclipse.org/content/stringer-java-obfuscator
https://marketplace.eclipse.org/content/java-antidecompiler
When should the obfuscation be done??
I have used Obfuscating my RCP application when I do not want to show my package name, method name while extracting code, the objective behind was that we have write down a very specific tool which had some genius and patent code and we do not want to make it free. Simply, in case when you do not want to show your logic.
Approach:
We did in a way that all package names and method names will appear like "OOOOOMMEEOOOOOOOOO" or "EEEEEXXXXXOOOOXX" while extracting or decompiling. you can also write your own logic to replicate specifically what you need and what you target.
It would be good which API or part of code or jar you want to Obfuscating, in my case, RCP application was combination of four applications and we did Obfuscating for our patent code jar only.
You can also refer this:
https://rcpquickstart.wordpress.com/2007/06/22/obfuscating-an-rcp-application/

Eclipse e4 migrating 3.x plugin to 4.x?

I have been working with Eclipse RCP for over a week now, and I've now been given an Eclipse plugin written in 3.x, which I need to migrate to 4.x. I'm using a book called Eclipse 4 RCP by Lars Vogel which has a small section on this, but I can't for the life of me figure out what I'm to do.
I'm trying to do this throught the use of the compatiblity layer. It mentions to add a couple of features for this (org.eclipse.rcp, org.eclipse.emf.ecore, org.eclipse.emf.common) and your ready to go, but I don't exactly know what I'm to do here. Like do I add these to the existing product file of the 3.x plugin I've been given, or do I create a separate e4 project and point to that. Many of the tutorials I read are a bit vague with the details and its a shame there's no proper step by step guide for beginners with this. Any help would be great.
Probably, you should be creating a separate e4 plug-in project for this. And where you have to configure your extensions/extension points in e4 ways.
Basically, like creating a new project.
If you want to migrate your Eclipse 3.x RCP application to the Eclipse 4 programming model, you can't directly reuse existing plugin.xml based user interface components, e.g. Views or Editors based on the definition in plugin.xml .
Components based on the plugin.xml file must be adjusted to avoid inheritance of Eclipse classes and to use the programming model based on #Inject . They also must be contributed to the application model.
Components which are not directly based on the plugin.xml file must be adjusted if they use Eclipse 3.x singletons, as for example Platform or PlatformUI , to access Eclipse API
you may want to take a look at this page: https://www.eclipse.org/community/eclipse_newsletter/2013/february/article3.php

Error on creating a BPMN diagram with BPMN2 and Graphiti

I'm trying to use Drools Gorm plugin to build process in my Grails application. Therefore, it is needed to use bpmn diagrams in order to instanciate a process. For this, i'm started to use two eclipse plugins: the BPMN2 and Graphiti (that is required for the first one).
But, when i try to create a .bpmn file on src/diagrams, i'm getting this error on output alert screen:
Error org/eclipse/graphiti/ui/editor/diagrameditorfactory
I looked everywhere and i don't find any reasonable solutions. Any help is welcome!
Did you try the drools jBPM plugin? It seems to work pretty well. If you are alright with using another editor, you should try that. The update site is located here

Is it possible to mock all the objects around an eclipse RCP application?

I've been trying for a while now to do something a bit strange...
I need to invoke some code that gets executed by a eclipse rcp wizard window from outside the rcp environment.
Basically some third party team has built an installer using the eclipse rcp framework and one of the functionalities of this installer is to export some data.
I need to perform that same data export programmatically but from outside this whole rcp scope. (basically from ant).
The issues I seem to be facing are connected to not having the org.osgi.framework.BundleContext objects populated.
Any idea how I can mock them?
thank you in advance
Found the answer... import org.springframework.osgi.mock;

Why can't I find Java desktop application in Netbeans 7.1

I downloaded Netbeans 7.1 with all bundle from http://netbeans.org/downloads and installed it successfully on Windows 7.
But I can't find Java Desktop Application which should be under Java category when add new project as 7.0 does.
Where is it? Or what is the substitute one in 7.1? I need something to create GUI by dragging components.
Thanks.
Look here: http://netbeans.org/bugzilla/show_bug.cgi?id=204661
Support for [B]SAF (JSR 296, basically the framework that was behind your "Java Desktop Application" project template) has been abruptly dropped (for no valid reason, let me add).
However, as Bill says in his answer, it is not necessary to use the SAF in order to visually design a form. NetBeans swing-designer (known as Matisse) can be used to design any JFrame, JDialog, JPanel, etc.
You just have to
Right click -> New -> JFrame Form...
and you're ready to drag-and-drop!
(The features you'll be missing are the extra bells and whistles that such framework provided, like SAF Actions, windowing persistence, simplified management for long running Tasks and related visual feedback [now you have to get your hands dirty with the SwingWorker class], etc)
Java Desktop refers to an effort to create a standard or library (libraries) that never really produced anything of significance. I think its likely that they finally removed it from Netbeans.
Its easier to just create a new Java Application project, don't bother with a main, then create a new JFrame Form. That class will have a main for you to use, and you can also design the frame in the form. You can also create JPanel Form classes. Note: you can do this in just about any project in netbeans, there is nothing special about the projects for them.
its better to use NetBeans 7.0 for full support of swing components.
many tutorials and guides feature the "Java Desktop Application" (like the ones for JXMapKit : http://today.java.net/pub/a/today/2007/10/30/building-maps-into-swing-app-with-jxmapviewer.html )
You can find something helpful to create CRUD desktop application in Java.
You can find it here.