gpt4 book ai didi

java - Zest Graph - 可编辑还是不可编辑?如何开始上课?

转载 作者:太空宇宙 更新时间:2023-11-04 08:05:33 32 4
gpt4 key购买 nike

我正在开发一个项目,我打算在 JAVA 中创建一个类,用它来创建一个图表。详细地说,我想创建 2 个接口(interface) - VERTEX 和 EDGE,每个接口(interface)都有 addVertex()、addEdge()、neighborVertex()、numOfNeighbors() 等方法,而我的类(称为 Graph)将实现上述接口(interface)。

我目前是 JAVA 的新手,想知道如何继续使用 ZEST?另外,如果我使用 ZEST,图表是否可以编辑?

教程 Lars Vogel帮助了我,但我仍然无法让它工作。如何解决以下错误?

    !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)

错误日志如下:

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)

最佳答案

如果您想使用 Zest 可视化图表,则必须将自己的图表对象转换为 Zest 图表,或者首先使用 Zest 对象。看看 Eclipse wiki 中的一些示例和 this tutorial .

该图无法使用 Zest(专注于可视化)进行编辑,但基于 SWT,您可以使图具有交互性(向节点添加监听器等)。如果您想要图形编辑,请查看 Graphiti或者类似 JUNG .

关于java - Zest Graph - 可编辑还是不可编辑?如何开始上课?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12140232/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com