2012-08-27 18 views
2

我正在開發一個項目,在那裏我打算在JAVA中創建一個類,使用它我可以創建一個圖。詳細地說,我想創建2個接口 - VERTEX和EDGE,每個接口都有addVertex(),addEdge(),neighborVertex(),numOfNeighbors()等方法,以及我的類(稱爲Graph)將實現上述接口。 我現在是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) 

可能有人建議我現在該怎麼辦?幫助將真正被讚賞。

回答

1

如果要用Zest將圖形可視化,則必須將自己的圖形對象轉換爲Zest圖形,或者首先使用Zest對象。看看Eclipse wikithis tutorial中的一些樣本。

該圖不能用Zest編輯(重點在於可視化),但是基於SWT,您可以使圖形交互(將偵聽器添加到節點等)。如果你想要編輯圖形,可以看看Graphiti或者JUNG

+0

嘿,費邊!謝啦。還有一些東西可以幫助你。請看看我的問題(尤其是'編輯')。 –

+0

@Anirudh這就是我想嘗試的:在你的啓動配置中,選項卡'Plug-ins',頂部,'Launch with',選擇'all workspace and enable target plug-ins'或者:選擇'plug-ins只在下面選擇',然後點擊'全部取消選擇',選擇你自己的插件,然後點擊'添加必需的插件'。 –

+0

這就是我上次編輯問題之前所做的。實際上,除了我知道的那些插件外,我實際上無法弄清楚需要哪些插件。我選擇了所有並嘗試了,也取消了所有選擇,並選擇了我認爲需要的那些。你能否再次通過並讓我知道我錯過了哪些地方?是否需要在錯誤日誌視圖中顯示以下內容? 「以下是未解決問題的軟件包的完整列表,如果存在,請參閱根本原因的先前日誌條目:」 –