Question

I'm working on a project, where I intend to make a class in JAVA using which I could create a graph. To put it in detail, I'd like to create 2 interfaces - VERTEX and EDGE, each one having methods like addVertex(), addEdge(), neighborVertex(), numOfNeighbors() etc., and my class (call it Graph) will implement the aforementioned interfaces.

I'm a real novice at JAVA at the moment, and was wondering how to go ahead using ZEST? Also, would the graph be editable if I use ZEST?

The tutorial by Lars Vogel helped me, but I'm still unable to get it working. How can I resolve the following errors?

    !SESSION 2012-08-30 13:00:20.498 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -application first.prog.zest.jface.application
Command-line arguments:  -application first.prog.zest.jface.application -data D:\Workspace/../runtime-first.prog.zest.jface.application -dev file:D:/Workspace/.metadata/.plugins/org.eclipse.pde.core/first.prog.zest.jface.application/dev.properties -os win32 -ws win32 -arch x86 -consoleLog

!ENTRY org.eclipse.osgi 2 0 2012-08-30 13:01:06.592
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-08-30 13:01:06.592
!MESSAGE Bundle reference:file:/D:/Workspace/first.prog.zest.jface/ was not resolved.
!SUBENTRY 2 first.prog.zest.jface 2 0 2012-08-30 13:01:06.592
!MESSAGE Missing required bundle org.eclipse.zest.layouts.source_1.1.0.
!SUBENTRY 2 first.prog.zest.jface 2 0 2012-08-30 13:01:06.592
!MESSAGE Missing required bundle org.eclipse.zest.core.source_1.3.0.

!ENTRY org.eclipse.osgi 2 0 2012-08-30 13:01:06.608
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-08-30 13:01:06.608
!MESSAGE Bundle first.prog.zest.jface_1.0.0.qualifier [93] was not resolved.
!SUBENTRY 2 first.prog.zest.jface 2 0 2012-08-30 13:01:06.608
!MESSAGE Missing required bundle org.eclipse.zest.core.source_1.3.0.
!SUBENTRY 2 first.prog.zest.jface 2 0 2012-08-30 13:01:06.608
!MESSAGE Missing required bundle org.eclipse.zest.layouts.source_1.1.0.

!ENTRY org.eclipse.osgi 2 0 2012-08-30 13:01:06.749
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-08-30 13:01:06.749
!MESSAGE Bundle reference:file:/D:/Workspace/first.prog.zest.jface/ was not resolved.
!SUBENTRY 2 first.prog.zest.jface 2 0 2012-08-30 13:01:06.749
!MESSAGE Missing required bundle org.eclipse.zest.layouts.source_1.1.0.
!SUBENTRY 2 first.prog.zest.jface 2 0 2012-08-30 13:01:06.749
!MESSAGE Missing required bundle org.eclipse.zest.core.source_1.3.0.

!ENTRY org.eclipse.osgi 2 0 2012-08-30 13:01:06.749
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-08-30 13:01:06.749
!MESSAGE Bundle first.prog.zest.jface_1.0.0.qualifier [93] was not resolved.
!SUBENTRY 2 first.prog.zest.jface 2 0 2012-08-30 13:01:06.749
!MESSAGE Missing required bundle org.eclipse.zest.core.source_1.3.0.
!SUBENTRY 2 first.prog.zest.jface 2 0 2012-08-30 13:01:06.749
!MESSAGE Missing required bundle org.eclipse.zest.layouts.source_1.1.0.

!ENTRY org.eclipse.osgi 4 0 2012-08-30 13:01:06.764
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "first.prog.zest.jface.application" could not be found in the registry. The applications available are: org.eclipse.ant.core.antRunner, org.eclipse.ant.ui.antRunner, org.eclipse.cdt.codan.core.application, org.eclipse.cdt.core.GeneratePDOM, org.eclipse.cdt.managedbuilder.core.headlessbuild, org.eclipse.e4.ui.workbench.swt.E4Application, org.eclipse.e4.ui.workbench.swt.GenTopic, org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.codegen.ecore.Generator, org.eclipse.emf.importer.ecore.Ecore2GenModel, org.eclipse.emf.importer.java.Java2GenModel, org.eclipse.emf.importer.rose.Rose2GenModel, org.eclipse.equinox.app.error, org.eclipse.equinox.p2.director, org.eclipse.equinox.p2.garbagecollector.application, org.eclipse.equinox.p2.publisher.InstallPublisher, org.eclipse.equinox.p2.publisher.EclipseGenerator, org.eclipse.equinox.p2.publisher.ProductPublisher, org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher, org.eclipse.equinox.p2.reconciler.application, org.eclipse.equinox.p2.repository.repo2runnable, org.eclipse.equinox.p2.repository.metadataverifier, org.eclipse.equinox.p2.artifact.repository.mirrorApplication, org.eclipse.equinox.p2.metadata.repository.mirrorApplication, org.eclipse.equinox.p2.updatesite.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.CategoryPublisher, org.eclipse.help.base.infocenterApplication, org.eclipse.help.base.helpApplication, org.eclipse.help.base.indexTool, org.eclipse.jdt.apt.core.aptBuild, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer, org.eclipse.pde.build.Build, org.eclipse.pde.junit.runtime.uitestapplication, org.eclipse.pde.junit.runtime.legacytestapplication, org.eclipse.pde.junit.runtime.coretestapplication, org.eclipse.pde.junit.runtime.coretestapplicationnonmain, org.eclipse.pde.junit.runtime.nonuithreadtestapplication, org.eclipse.ui.ide.workbench.
    at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)
    at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

The error log reads as follows:

java.lang.RuntimeException: Application "first.prog.zest.jface.application" could not be found in the registry. The applications available are: org.eclipse.ant.core.antRunner, org.eclipse.ant.ui.antRunner, org.eclipse.cdt.codan.core.application, org.eclipse.cdt.core.GeneratePDOM, org.eclipse.cdt.managedbuilder.core.headlessbuild, org.eclipse.e4.ui.workbench.swt.E4Application, org.eclipse.e4.ui.workbench.swt.GenTopic, org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.codegen.ecore.Generator, org.eclipse.emf.importer.ecore.Ecore2GenModel, org.eclipse.emf.importer.java.Java2GenModel, org.eclipse.emf.importer.rose.Rose2GenModel, org.eclipse.equinox.app.error, org.eclipse.equinox.p2.director, org.eclipse.equinox.p2.garbagecollector.application, org.eclipse.equinox.p2.publisher.InstallPublisher, org.eclipse.equinox.p2.publisher.EclipseGenerator, org.eclipse.equinox.p2.publisher.ProductPublisher, org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher, org.eclipse.equinox.p2.reconciler.application, org.eclipse.equinox.p2.repository.repo2runnable, org.eclipse.equinox.p2.repository.metadataverifier, org.eclipse.equinox.p2.artifact.repository.mirrorApplication, org.eclipse.equinox.p2.metadata.repository.mirrorApplication, org.eclipse.equinox.p2.updatesite.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.CategoryPublisher, org.eclipse.help.base.infocenterApplication, org.eclipse.help.base.helpApplication, org.eclipse.help.base.indexTool, org.eclipse.jdt.apt.core.aptBuild, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer, org.eclipse.pde.build.Build, org.eclipse.pde.junit.runtime.uitestapplication, org.eclipse.pde.junit.runtime.legacytestapplication, org.eclipse.pde.junit.runtime.coretestapplication, org.eclipse.pde.junit.runtime.coretestapplicationnonmain, org.eclipse.pde.junit.runtime.nonuithreadtestapplication, org.eclipse.ui.ide.workbench.
    at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)
    at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Was it helpful?

Solution

If you want to visualize your graph with Zest, you would have to transform your own graph objects into Zest graphs, or use the Zest objects in the first place. Have a look at some samples in the Eclipse wiki and this tutorial.

The graph would not be editable with Zest (which focuses on visualization), but being SWT-based you can make your graph interactive (add listeners to nodes etc.). If you want graph editing have a look at Graphiti or maybe something like JUNG.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top