Eclipse Plugin Development Tutorial

411 views
Skip to first unread message

giancarlo.capone

unread,
Mar 14, 2011, 11:46:32 AM3/14/11
to vogella
Good evening to all !!!
I'm a student and I want to learn more abut the development of Eclipse
plug-in.
I was trying your tutorial : http://www.vogella.de/articles/EclipsePlugIn/article.html#contribute,
but I'm not able to make the "conversion to HTML" works.
When I right-click on the file .java and click on "Create HTML", I
can't see the HTML file.
Where can I find it ????
Thanks all .

Lars Vogel

unread,
Mar 14, 2011, 11:47:43 AM3/14/11
to vog...@googlegroups.com
Hi,

try F5 on your project.

Best regards, Lars

2011/3/14 giancarlo.capone <giancarlo...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "vogella" group.
> To post to this group, send email to vog...@googlegroups.com.
> To unsubscribe from this group, send email to vogella+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/vogella?hl=en.
>
>

--
Lars
http://www.vogella.de - Tutorials about Java, Eclipse and Web programming
http://www.twitter.com/vogella - Lars on Twitter

giancarlo.capone

unread,
Mar 14, 2011, 12:03:15 PM3/14/11
to vogella
I've tried with F5, but nothing happen.
I've noticed that when I right-click on MANIFEST.MF file and click on
Run-As "Eclipse Application", I've the following errors in the
console :

2011-03-14 17:01:27.659:INFO::Logging to STDERR via
org.mortbay.log.StdErrLog
2011-03-14 17:01:27.672:INFO::jetty-6.1.x
2011-03-14 17:01:27.693:WARN::failed SocketC...@0.0.0.0:50313:
java.net.BindException: Indirizzo già in uso
2011-03-14 17:01:27.693:WARN::failed Server@3ad3ac1:
java.net.BindException: Indirizzo già in uso
!SESSION 2011-03-14 17:01:17.128
-----------------------------------------------
eclipse.buildId=M20110210-1200
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=it_IT
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -product org.eclipse.epp.package.jee.product -
data /usr/local/apache-tomcat-7.0.10/webapps/../runtime-
EclipseApplication(1) -dev file:/usr/local/apache-tomcat-7.0.10/
webapps/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application
(1)/dev.properties -os linux -ws gtk -arch x86_64 -consoleLog

!ENTRY com.google.gwt.eclipse.core 4 0 2011-03-14 17:01:27.696
!MESSAGE Could not start source viewer server.
!STACK 0
java.net.BindException: Indirizzo già in uso
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:383)
at java.net.ServerSocket.bind(ServerSocket.java:328)
at java.net.ServerSocket.<init>(ServerSocket.java:194)
at java.net.ServerSocket.<init>(ServerSocket.java:150)
at
org.mortbay.jetty.bio.SocketConnector.newServerSocket(SocketConnector.java:
80)
at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:
73)
at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:
283)
at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:
147)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at org.mortbay.jetty.Server.doStart(Server.java:235)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
com.google.gdt.eclipse.platform.jetty.JettyServer.start(JettyServer.java:
62)
at com.google.gwt.eclipse.core.GWTPlugin.start(GWTPlugin.java:116)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl
$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:
774)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:
755)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:
370)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:
284)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:
417)
at
org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:
265)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:
106)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:
453)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:
216)
at
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:
393)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:
469)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:
422)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:
410)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:
107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:
338)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:
232)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:
1197)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:
174)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:
904)
at
org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:
243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:
55)
at org.eclipse.jdt.internal.core.JavaModelManager
$4.run(JavaModelManager.java:311)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.jdt.internal.core.JavaModelManager
$CompilationParticipants.getCompilationParticipants(JavaModelManager.java:
306)
at
org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.notifyParticipants(ReconcileWorkingCopyOperation.java:
238)
at
org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:
94)
at
org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:
728)
at
org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:
788)
at
org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:
1244)
at
org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:
126)
at
org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.access
$0(JavaReconcilingStrategy.java:108)
at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy
$1.run(JavaReconcilingStrategy.java:89)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:
87)
at
org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.initialReconcile(JavaReconcilingStrategy.java:
178)
at
org.eclipse.jdt.internal.ui.text.CompositeReconcilingStrategy.initialReconcile(CompositeReconcilingStrategy.java:
114)
at
org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.initialReconcile(JavaCompositeReconcilingStrategy.java:
133)
at
org.eclipse.jface.text.reconciler.MonoReconciler.initialProcess(MonoReconciler.java:
105)
at
org.eclipse.jdt.internal.ui.text.JavaReconciler.initialProcess(JavaReconciler.java:
398)
at org.eclipse.jface.text.reconciler.AbstractReconciler
$BackgroundThread.run(AbstractReconciler.java:173)

giancarlo.capone

unread,
Mar 14, 2011, 12:23:25 PM3/14/11
to vogella
and when I click on "Create HTML" in the console I have the following
error :

!ENTRY org.eclipse.ui 4 4 2011-03-14 17:19:56.028
!MESSAGE The proxied handler for
'de.vogella.plugin.htmlconverter.Convert' could not be loaded

!ENTRY org.eclipse.ui 4 0 2011-03-14 17:19:56.028
!MESSAGE The proxied handler for
'de.vogella.plugin.htmlconverter.Convert' could not be loaded
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in
de.vogella.plugin.htmlconverter.convert was unable to load class
de.vogella.plugin.htmlconverter.Convert.
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:
194)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:
176)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:
904)
at
org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:
243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:
55)
at
org.eclipse.ui.internal.handlers.HandlerProxy.loadHandler(HandlerProxy.java:
350)
at
org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:
286)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:
476)
at
org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:
508)
at
org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:
169)
at
org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:
241)
at
org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:
241)
at
org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:
820)
at org.eclipse.ui.menus.CommandContributionItem.access
$19(CommandContributionItem.java:806)
at org.eclipse.ui.menus.CommandContributionItem
$5.handleEvent(CommandContributionItem.java:796)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:
3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:
2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:
664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:
115)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
196)
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:
369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Caused by: java.lang.ClassNotFoundException:
de.vogella.plugin.htmlconverter.Convert
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:
506)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:
422)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:
410)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:
107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:
338)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:
232)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:
1197)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:
174)
... 38 more
!SUBENTRY 1 org.eclipse.equinox.registry 4 1 2011-03-14 17:19:56.030
!MESSAGE Plug-in de.vogella.plugin.htmlconverter.convert was unable to
load class de.vogella.plugin.htmlconverter.Convert.
!STACK 0
java.lang.ClassNotFoundException:
de.vogella.plugin.htmlconverter.Convert
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:
506)
org.eclipse.ui.internal.handlers.HandlerProxy.loadHandler(HandlerProxy.java:
350)
at
org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:
286)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:
476)
at
org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:
508)
at
org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:
169)
at
org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:
241)
at
org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:
241)
at
org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:
820)
at org.eclipse.ui.menus.CommandContributionItem.access
$19(CommandContributionItem.java:806)
at org.eclipse.ui.menus.CommandContributionItem
$5.handleEvent(CommandContributionItem.java:796)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:
3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:
2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:
664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:
115)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
196)
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:
369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

!ENTRY org.eclipse.ui 4 4 2011-03-14 17:19:56.032
!MESSAGE Failed to execute item
de.vogella.plugin.htmlconverter.convert
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in
de.vogella.plugin.htmlconverter.convert was unable to load class
de.vogella.plugin.htmlconverter.Convert.
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:
194)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:
176)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:
904)
at
org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:
243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:
55)
at
org.eclipse.ui.internal.handlers.HandlerProxy.loadHandler(HandlerProxy.java:
350)
at
org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:
286)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:
476)
at
org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:
508)
at
org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:
169)
at
org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:
241)
at
org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:
241)
at
org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:
820)
at org.eclipse.ui.menus.CommandContributionItem.access
$19(CommandContributionItem.java:806)
at org.eclipse.ui.menus.CommandContributionItem
$5.handleEvent(CommandContributionItem.java:796)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:
3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:
2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:
664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:
115)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
196)
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:
369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Caused by: java.lang.ClassNotFoundException:
de.vogella.plugin.htmlconverter.Convert
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:
506)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:
422)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:
410)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:
107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:
338)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:
232)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:
1197)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:
174)
... 38 more
!SUBENTRY 1 org.eclipse.equinox.registry 4 1 2011-03-14 17:19:56.033
!MESSAGE Plug-in de.vogella.plugin.htmlconverter.convert was unable to
load class de.vogella.plugin.htmlconverter.Convert.
!STACK 0
java.lang.ClassNotFoundException:
de.vogella.plugin.htmlconverter.Convert
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:
506)
org.eclipse.ui.internal.handlers.HandlerProxy.loadHandler(HandlerProxy.java:
350)
at
org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:
286)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:
476)
at
org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:
508)
at
org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:
169)
at
org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:
241)
at
org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:
241)
at
org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:
820)
at org.eclipse.ui.menus.CommandContributionItem.access
$19(CommandContributionItem.java:806)
at org.eclipse.ui.menus.CommandContributionItem
$5.handleEvent(CommandContributionItem.java:796)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:
3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:
2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:
664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:
115)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
196)
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:
369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

Lars Vogel

unread,
Mar 14, 2011, 4:46:51 PM3/14/11
to vog...@googlegroups.com
I think the message is pretty clear: java.lang.ClassNotFoundException:
de.vogella.plugin.htmlconverter.Convert

Check your runtime configuration.

2011/3/14 giancarlo.capone <giancarlo...@gmail.com>:

giancarlo.capone

unread,
Mar 18, 2011, 11:20:56 AM3/18/11
to vogella
Thank you very much!!!

Now I have another problem :

I need a plug-in so when I right-click on a file (for example an html
file) and choose for example the Option "Modify HTML" I can open and
modify that file. I think I need only to know the path of the file
that I right-click, and so I can open that file using the class File.

The example given in the tutorial is similar, but with that code I can
only open java files.
I think the problem is ICompilationUnit that represents an entire Java
compilation unit, but I hadn't understood how I can modify that code
to re-use it.

Who can help me ????

Thanks.

giancarlo.capone

unread,
Mar 21, 2011, 5:12:24 AM3/21/11
to vogella
Probably I don't need the path of that file, but I need each code-line
of the HTML page that I select (right-click on a file in the Package
Explorer and choose for example the option "Modify" I've created).
Does anyone know how can I write this plug-in ???
Which classes should I use to read that file ?

Thank you very much !!!

giancarlo.capone

unread,
Mar 21, 2011, 12:53:35 PM3/21/11
to vogella
I've partially resolved, but it reads only java files. I need to read
html files.

I think the problem is ICompilationUnit.

How can I resolve it ???

Thanks.



public class Convert extends AbstractHandler {
@Override
public Object execute(ExecutionEvent event) throws ExecutionException
{

IStructuredSelection selection = (IStructuredSelection) HandlerUtil
.getActiveMenuSelection(event);

Object firstElement = selection.getFirstElement();

if (firstElement instanceof ICompilationUnit) {

ICompilationUnit cu = (ICompilationUnit) firstElement;

IPath url;
IResource risorsa= cu.getResource();
url=risorsa.getRawLocation();

System.out.println("l'url del file selezionato è : "+ url);

File file=new File(url.toString());

try{
InputStreamReader reader = new InputStreamReader
(System.in);

String str= url.toString();

FileInputStream fstream = new FileInputStream(str);
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new
InputStreamReader(in));
String strLine;
int i=1;

while ((strLine = br.readLine()) != null){
System.out.println (i+" " + strLine);
i++;
}
in.close();
}catch (Exception e){
System.err.println("Errore: " + e.getMessage());
}
}
return null;
} }

Reply all
Reply to author
Forward
0 new messages