Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » [SOLVED] How to open an IJavaElement programatically?
icon10.gif  [SOLVED] How to open an IJavaElement programatically? [message #650853] Wed, 26 January 2011 20:33 Go to next message
Kivanc Muslu is currently offline Kivanc MusluFriend
Messages: 153
Registered: November 2010
Senior Member
Hi,

I am trying to open an IJavaElement (created from an actual .java file) programatically by using:

IProject project = ... // get a project from workspace.
IFile file = project.getFile("<ClassName>.java");
ICompilationUnit javaElement = (ICompilationUnit) JavaCore.create(file);
javaElement.open(null);


However, for the last line of the code, I get the following exception:

org.osgi.framework.BundleException: The activator com.kivancmuslu.deneme.Activator for bundle com.kivancmuslu.deneme is invalid
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:156)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:751)
	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.ui.text.correction.ContributedProcessorDescriptor.getProcessor(ContributedProcessorDescriptor.java:133)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor$SafeHasCorrections.safeRun(JavaCorrectionProcessor.java:445)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor$SafeCorrectionProcessorAccess.run(JavaCorrectionProcessor.java:336)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor$SafeCorrectionProcessorAccess.process(JavaCorrectionProcessor.java:332)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.hasCorrections(JavaCorrectionProcessor.java:110)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.hasCorrections(JavaCorrectionProcessor.java:131)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.showQuickFix(JavaAnnotationImageProvider.java:89)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getImageType(JavaAnnotationImageProvider.java:115)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getManagedImage(JavaAnnotationImageProvider.java:65)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getImage(JavaAnnotationImageProvider.java:131)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getManagedImage(JavaAnnotationImageProvider.java:66)
	at org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.getImage(DefaultMarkerAnnotationAccess.java:377)
	at org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.paint(DefaultMarkerAnnotationAccess.java:264)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.doPaint1(AnnotationRulerColumn.java:790)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBufferPaint(AnnotationRulerColumn.java:541)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.access$3(AnnotationRulerColumn.java:517)
	at org.eclipse.jface.text.source.AnnotationRulerColumn$1.paintControl(AnnotationRulerColumn.java:289)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:223)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
	at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1131)
	at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:134)
	at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:685)
	at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:129)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4958)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSWindow.makeKeyAndOrderFront(NSWindow.java:190)
	at org.eclipse.swt.widgets.Shell.makeKeyAndOrderFront(Shell.java:1130)
	at org.eclipse.swt.widgets.Shell.setWindowVisible(Shell.java:1740)
	at org.eclipse.swt.widgets.Shell.open(Shell.java:1173)
	at org.eclipse.jface.window.Window.open(Window.java:797)
	at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:790)
	at org.eclipse.ui.internal.Workbench$66.runWithException(Workbench.java:3660)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3586)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3279)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
	at org.eclipse.ui.internal.Workbench$31.runWithException(Workbench.java:1567)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3586)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3279)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
	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:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: Java Model Exception: Java Model Status [<project root> [in Quickfixes] is not on its project's build path]
	at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:502)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:246)
	at org.eclipse.jdt.internal.core.Openable.openAncestors(Openable.java:504)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:240)
	at org.eclipse.jdt.internal.core.Openable.openAncestors(Openable.java:504)
	at org.eclipse.jdt.internal.core.CompilationUnit.openAncestors(CompilationUnit.java:1170)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:240)
	at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:515)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:252)
	at org.eclipse.jdt.internal.core.Openable.open(Openable.java:432)
	at com.kivancmuslu.deneme.Activator.<init>(Activator.java:252)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:151)
	... 90 more
Root exception:
Java Model Exception: Java Model Status [<project root> [in Quickfixes] is not on its project's build path]
	at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:502)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:246)
	at org.eclipse.jdt.internal.core.Openable.openAncestors(Openable.java:504)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:240)
	at org.eclipse.jdt.internal.core.Openable.openAncestors(Openable.java:504)
	at org.eclipse.jdt.internal.core.CompilationUnit.openAncestors(CompilationUnit.java:1170)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:240)
	at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:515)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:252)
	at org.eclipse.jdt.internal.core.Openable.open(Openable.java:432)
	at com.kivancmuslu.deneme.Activator.<init>(Activator.java:252)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:151)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:751)
	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.ui.text.correction.ContributedProcessorDescriptor.getProcessor(ContributedProcessorDescriptor.java:133)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor$SafeHasCorrections.safeRun(JavaCorrectionProcessor.java:445)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor$SafeCorrectionProcessorAccess.run(JavaCorrectionProcessor.java:336)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor$SafeCorrectionProcessorAccess.process(JavaCorrectionProcessor.java:332)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.hasCorrections(JavaCorrectionProcessor.java:110)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.hasCorrections(JavaCorrectionProcessor.java:131)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.showQuickFix(JavaAnnotationImageProvider.java:89)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getImageType(JavaAnnotationImageProvider.java:115)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getManagedImage(JavaAnnotationImageProvider.java:65)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getImage(JavaAnnotationImageProvider.java:131)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getManagedImage(JavaAnnotationImageProvider.java:66)
	at org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.getImage(DefaultMarkerAnnotationAccess.java:377)
	at org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.paint(DefaultMarkerAnnotationAccess.java:264)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.doPaint1(AnnotationRulerColumn.java:790)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBufferPaint(AnnotationRulerColumn.java:541)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.access$3(AnnotationRulerColumn.java:517)
	at org.eclipse.jface.text.source.AnnotationRulerColumn$1.paintControl(AnnotationRulerColumn.java:289)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:223)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
	at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1131)
	at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:134)
	at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:685)
	at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:129)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4958)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSWindow.makeKeyAndOrderFront(NSWindow.java:190)
	at org.eclipse.swt.widgets.Shell.makeKeyAndOrderFront(Shell.java:1130)
	at org.eclipse.swt.widgets.Shell.setWindowVisible(Shell.java:1740)
	at org.eclipse.swt.widgets.Shell.open(Shell.java:1173)
	at org.eclipse.jface.window.Window.open(Window.java:797)
	at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:790)
	at org.eclipse.ui.internal.Workbench$66.runWithException(Workbench.java:3660)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3586)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3279)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
	at org.eclipse.ui.internal.Workbench$31.runWithException(Workbench.java:1567)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3586)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3279)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
	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:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)

!ENTRY org.eclipse.jdt.ui 4 10001 2011-01-26 12:28:05.413
!MESSAGE Internal Error
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in com.kivancmuslu.deneme was unable to load class edu.uw.quickfix.speculation.proposal.QuickFixProcessor.
	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.jdt.internal.ui.text.correction.ContributedProcessorDescriptor.getProcessor(ContributedProcessorDescriptor.java:133)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor$SafeHasCorrections.safeRun(JavaCorrectionProcessor.java:445)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor$SafeCorrectionProcessorAccess.run(JavaCorrectionProcessor.java:336)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor$SafeCorrectionProcessorAccess.process(JavaCorrectionProcessor.java:332)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.hasCorrections(JavaCorrectionProcessor.java:110)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.hasCorrections(JavaCorrectionProcessor.java:131)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.showQuickFix(JavaAnnotationImageProvider.java:89)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getImageType(JavaAnnotationImageProvider.java:115)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getManagedImage(JavaAnnotationImageProvider.java:65)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getImage(JavaAnnotationImageProvider.java:131)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getManagedImage(JavaAnnotationImageProvider.java:66)
	at org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.getImage(DefaultMarkerAnnotationAccess.java:377)
	at org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.paint(DefaultMarkerAnnotationAccess.java:264)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.doPaint1(AnnotationRulerColumn.java:790)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBufferPaint(AnnotationRulerColumn.java:541)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.access$3(AnnotationRulerColumn.java:517)
	at org.eclipse.jface.text.source.AnnotationRulerColumn$1.paintControl(AnnotationRulerColumn.java:289)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:223)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
	at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1131)
	at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:134)
	at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:685)
	at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:129)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4958)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSWindow.makeKeyAndOrderFront(NSWindow.java:190)
	at org.eclipse.swt.widgets.Shell.makeKeyAndOrderFront(Shell.java:1130)
	at org.eclipse.swt.widgets.Shell.setWindowVisible(Shell.java:1740)
	at org.eclipse.swt.widgets.Shell.open(Shell.java:1173)
	at org.eclipse.jface.window.Window.open(Window.java:797)
	at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:790)
	at org.eclipse.ui.internal.Workbench$66.runWithException(Workbench.java:3660)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3586)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3279)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
	at org.eclipse.ui.internal.Workbench$31.runWithException(Workbench.java:1567)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3586)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3279)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
	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:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle com.kivancmuslu.deneme (485).
	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:121)
	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)
	... 72 more
Caused by: org.osgi.framework.BundleException: The activator com.kivancmuslu.deneme.Activator for bundle com.kivancmuslu.deneme is invalid
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:156)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:751)
	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)
	... 84 more
Caused by: Java Model Exception: Java Model Status [<project root> [in Quickfixes] is not on its project's build path]
	at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:502)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:246)
	at org.eclipse.jdt.internal.core.Openable.openAncestors(Openable.java:504)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:240)
	at org.eclipse.jdt.internal.core.Openable.openAncestors(Openable.java:504)
	at org.eclipse.jdt.internal.core.CompilationUnit.openAncestors(CompilationUnit.java:1170)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:240)
	at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:515)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:252)
	at org.eclipse.jdt.internal.core.Openable.open(Openable.java:432)
	at com.kivancmuslu.deneme.Activator.<init>(Activator.java:252)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:151)
	... 90 more
!SUBENTRY 1 org.eclipse.equinox.registry 4 1 2011-01-26 12:28:05.417
!MESSAGE Plug-in com.kivancmuslu.deneme was unable to load class edu.uw.quickfix.speculation.proposal.QuickFixProcessor.
!STACK 0
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle com.kivancmuslu.deneme (485).
	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:121)
	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.ui.text.correction.ContributedProcessorDescriptor.getProcessor(ContributedProcessorDescriptor.java:133)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor$SafeHasCorrections.safeRun(JavaCorrectionProcessor.java:445)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor$SafeCorrectionProcessorAccess.run(JavaCorrectionProcessor.java:336)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor$SafeCorrectionProcessorAccess.process(JavaCorrectionProcessor.java:332)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.hasCorrections(JavaCorrectionProcessor.java:110)
	at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.hasCorrections(JavaCorrectionProcessor.java:131)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.showQuickFix(JavaAnnotationImageProvider.java:89)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getImageType(JavaAnnotationImageProvider.java:115)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getManagedImage(JavaAnnotationImageProvider.java:65)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getImage(JavaAnnotationImageProvider.java:131)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getManagedImage(JavaAnnotationImageProvider.java:66)
	at org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.getImage(DefaultMarkerAnnotationAccess.java:377)
	at org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.paint(DefaultMarkerAnnotationAccess.java:264)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.doPaint1(AnnotationRulerColumn.java:790)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBufferPaint(AnnotationRulerColumn.java:541)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.access$3(AnnotationRulerColumn.java:517)
	at org.eclipse.jface.text.source.AnnotationRulerColumn$1.paintControl(AnnotationRulerColumn.java:289)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:223)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
	at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1131)
	at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:134)
	at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:685)
	at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:129)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4958)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSWindow.makeKeyAndOrderFront(NSWindow.java:190)
	at org.eclipse.swt.widgets.Shell.makeKeyAndOrderFront(Shell.java:1130)
	at org.eclipse.swt.widgets.Shell.setWindowVisible(Shell.java:1740)
	at org.eclipse.swt.widgets.Shell.open(Shell.java:1173)
	at org.eclipse.jface.window.Window.open(Window.java:797)
	at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:790)
	at org.eclipse.ui.internal.Workbench$66.runWithException(Workbench.java:3660)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3586)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3279)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
	at org.eclipse.ui.internal.Workbench$31.runWithException(Workbench.java:1567)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3586)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3279)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
	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:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: org.osgi.framework.BundleException: The activator com.kivancmuslu.deneme.Activator for bundle com.kivancmuslu.deneme is invalid
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:156)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:751)
	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)
	... 84 more
Caused by: Java Model Exception: Java Model Status [<project root> [in Quickfixes] is not on its project's build path]
	at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:502)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:246)
	at org.eclipse.jdt.internal.core.Openable.openAncestors(Openable.java:504)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:240)
	at org.eclipse.jdt.internal.core.Openable.openAncestors(Openable.java:504)
	at org.eclipse.jdt.internal.core.CompilationUnit.openAncestors(CompilationUnit.java:1170)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:240)
	at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:515)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:252)
	at org.eclipse.jdt.internal.core.Openable.open(Openable.java:432)
	at com.kivancmuslu.deneme.Activator.<init>(Activator.java:252)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:151)
	... 90 more


Any idea why this might happen or how I can fix it? Thanks in advance, best regards,

[Updated on: Sat, 29 January 2011 03:13]

Report message to a moderator

Re: How to open an IJavaElement programatically? [message #650890 is a reply to message #650853] Thu, 27 January 2011 03:47 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 1/27/2011 2:03 AM, Kivanc Muslu wrote:
> Hi,
>
> I am trying to open an IJavaElement (created from an actual .java file)
> programatically by using:
>
>
> IProject project = ... // get a project from workspace.
> IFile file = project.getFile("<ClassName>.java");
> ICompilationUnit javaElement = (ICompilationUnit) JavaCore.create(file);
> javaElement.open(null);
>
>
> However, for the last line of the code, I get the following exception:
>
Try
org.eclipse.jdt.ui.JavaUI.openInEditor(IJavaElement)
Re: How to open an IJavaElement programatically? [message #650891 is a reply to message #650853] Thu, 27 January 2011 04:02 Go to previous messageGo to next message
Satyam Kandula is currently offline Satyam KandulaFriend
Messages: 444
Registered: July 2009
Senior Member
This would happen if the java element is not in the source folder of the project.
Re: How to open an IJavaElement programatically? [message #650895 is a reply to message #650890] Thu, 27 January 2011 04:30 Go to previous messageGo to next message
Kivanc Muslu is currently offline Kivanc MusluFriend
Messages: 153
Registered: November 2010
Senior Member
Okay, thanks for the help but I keep getting the following exception:

org.eclipse.ui.PartInitException: No active workbench page
       at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.throwPartInitException(EditorUtility.java:385)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.throwPartInitException(EditorUtility.java:389)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:376)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:178)
	at org.eclipse.jdt.ui.JavaUI.openInEditor(JavaUI.java:692)
	at org.eclipse.jdt.ui.JavaUI.openInEditor(JavaUI.java:670)
	at edu.uw.quickfix.speculation.util.Aux.openEditor(Aux.java:81)
	at edu.uw.quickfix.speculation.util.Aux.openAndSwitchBack(Aux.java:116)
	at edu.uw.quickfix.speculation.util.QuickFixPreCalculator.doWork2(QuickFixPreCalculator.java:220)
	at edu.uw.quickfix.speculation.util.BlockableMortalThread.doWork(BlockableMortalThread.java:98)
	at edu.uw.quickfix.speculation.util.MortalThread.run(MortalThread.java:36)


I think this happens because the thread I am invoking the method is not a GUI thread, am I correct?

As a related and different question, do you know what changes internally for a IFile (or IJavaElement) when it is actively selected and opened in the page? If I were to find it and could do the same without actually openning the file, I think it would also work.

Thanks, regards,

Satyam Kandula wrote on Wed, 26 January 2011 23:02
This would happen if the java element is not in the source folder of the project.


Actually it is in under the src/ directory. I think the problem is something else.

[Updated on: Thu, 27 January 2011 04:31]

Report message to a moderator

Re: How to open an IJavaElement programatically? [message #650908 is a reply to message #650895] Thu, 27 January 2011 07:02 Go to previous messageGo to next message
Satyam Kandula is currently offline Satyam KandulaFriend
Messages: 444
Registered: July 2009
Senior Member
Kivanc Muslu wrote on Thu, 27 January 2011 10:00


Actually it is in under the src/ directory. I think the problem is something else.


javaElement.open() should work. Make sure that file name argument to project.getFile() has the complete project relative path to the file.


Re: How to open an IJavaElement programatically? [message #650918 is a reply to message #650908] Thu, 27 January 2011 07:50 Go to previous messageGo to next message
Kivanc Muslu is currently offline Kivanc MusluFriend
Messages: 153
Registered: November 2010
Senior Member
Quote:

javaElement.open() should work. Make sure that file name argument to project.getFile() has the complete project relative path to the file.



Hi, I checked again. iFile and IJavaElement (from JavaCore.create()) are created correctly and shows the corresponding correct files. I also checked, it it the correct project relative path (actually I am not creating it using IProject.getFile(), I am getting the iFile from another API).

Thanks for the suggestion though,
Re: How to open an IJavaElement programatically? [message #650939 is a reply to message #650853] Thu, 27 January 2011 08:23 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 26.01.2011 21:33, Kivanc Muslu wrote:
> Hi,
>
> I am trying to open an IJavaElement (created from an actual .java
> file) programatically by using:
What are you trying to do? Do you want to open the file as-is or a
tweaked in-memory version of it?

Dani
>
>
> IProject project = ... // get a project from workspace.
> IFile file = project.getFile("<ClassName>.java");
> ICompilationUnit javaElement = (ICompilationUnit) JavaCore.create(file);
> javaElement.open(null);
>
>
> However, for the last line of the code, I get the following exception:
>
>
> org.osgi.framework.BundleException: The activator
> com.kivancmuslu.deneme.Activator for bundle com.kivancmuslu.deneme is
> invalid
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:156)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:751)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:370)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:284)
> at
> org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.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.findLoc alClass(ClasspathManager.java:453)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:216)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:393)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:469)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.loadClass(Bund leLoader.java:338)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:232)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1197)
> at
> org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:174)
> at
> org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:904)
> at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
> at
> org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 55)
> at
> org.eclipse.jdt.internal.ui.text.correction.ContributedProce ssorDescriptor.getProcessor(ContributedProcessorDescriptor.j ava:133)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor$SafeHasCorrections.safeRun(JavaCorrectionProcessor.j ava:445)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor$SafeCorrectionProcessorAccess.run(JavaCorrectionProc essor.java:336)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor$SafeCorrectionProcessorAccess.process(JavaCorrection Processor.java:332)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor.hasCorrections(JavaCorrectionProcessor.java:110)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor.hasCorrections(JavaCorrectionProcessor.java:131)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.showQuickFix(JavaAnnotationImageProvider.java:89)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.getImageType(JavaAnnotationImageProvider.java:115)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.getManagedImage(JavaAnnotationImageProvider.java:65)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.getImage(JavaAnnotationImageProvider.java:131)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.getManagedImage(JavaAnnotationImageProvider.java:66)
> at
> org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.getI mage(DefaultMarkerAnnotationAccess.java:377)
> at
> org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.pain t(DefaultMarkerAnnotationAccess.java:264)
> at
> org.eclipse.jface.text.source.AnnotationRulerColumn.doPaint1 (AnnotationRulerColumn.java:790)
> at
> org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBu fferPaint(AnnotationRulerColumn.java:541)
> at
> org.eclipse.jface.text.source.AnnotationRulerColumn.access$3 (AnnotationRulerColumn.java:517)
> at
> org.eclipse.jface.text.source.AnnotationRulerColumn$1.paintC ontrol(AnnotationRulerColumn.java:289)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:223)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
> at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1131 )
> at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:134)
> at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:685)
> at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:129)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4958 )
> at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
> at
> org.eclipse.swt.internal.cocoa.NSWindow.makeKeyAndOrderFront (NSWindow.java:190)
> at
> org.eclipse.swt.widgets.Shell.makeKeyAndOrderFront(Shell.jav a:1130)
> at org.eclipse.swt.widgets.Shell.setWindowVisible(Shell.java:17 40)
> at org.eclipse.swt.widgets.Shell.open(Shell.java:1173)
> at org.eclipse.jface.window.Window.open(Window.java:797)
> at
> org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow .java:790)
> at
> org.eclipse.ui.internal.Workbench$66.runWithException(Workbe nch.java:3660)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3586)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3279)
> at
> org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:803)
> at
> org.eclipse.ui.internal.Workbench$31.runWithException(Workbe nch.java:1567)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3586)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3279)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
> 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(Work bench.java:664)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.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(EclipseS tarter.java:369)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
> Caused by: Java Model Exception: Java Model Status [<project root> [in
> Quickfixes] is not on its project's build path]
> at
> org.eclipse.jdt.internal.core.JavaElement.newJavaModelExcept ion(JavaElement.java:502)
> at
> org.eclipse.jdt.internal.core.Openable.generateInfos(Openabl e.java:246)
> at
> org.eclipse.jdt.internal.core.Openable.openAncestors(Openabl e.java:504)
> at
> org.eclipse.jdt.internal.core.Openable.generateInfos(Openabl e.java:240)
> at
> org.eclipse.jdt.internal.core.Openable.openAncestors(Openabl e.java:504)
> at
> org.eclipse.jdt.internal.core.CompilationUnit.openAncestors( CompilationUnit.java:1170)
> at
> org.eclipse.jdt.internal.core.Openable.generateInfos(Openabl e.java:240)
> at
> org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(Jav aElement.java:515)
> at
> org.eclipse.jdt.internal.core.JavaElement.getElementInfo(Jav aElement.java:252)
> at org.eclipse.jdt.internal.core.Openable.open(Openable.java:43 2)
> at com.kivancmuslu.deneme.Activator.<init>(Activator.java:252)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(Native ConstructorAccessorImpl.java:39)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(De legatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:5 13)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:151)
> ... 90 more
> Root exception:
> Java Model Exception: Java Model Status [<project root> [in
> Quickfixes] is not on its project's build path]
> at
> org.eclipse.jdt.internal.core.JavaElement.newJavaModelExcept ion(JavaElement.java:502)
> at
> org.eclipse.jdt.internal.core.Openable.generateInfos(Openabl e.java:246)
> at
> org.eclipse.jdt.internal.core.Openable.openAncestors(Openabl e.java:504)
> at
> org.eclipse.jdt.internal.core.Openable.generateInfos(Openabl e.java:240)
> at
> org.eclipse.jdt.internal.core.Openable.openAncestors(Openabl e.java:504)
> at
> org.eclipse.jdt.internal.core.CompilationUnit.openAncestors( CompilationUnit.java:1170)
> at
> org.eclipse.jdt.internal.core.Openable.generateInfos(Openabl e.java:240)
> at
> org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(Jav aElement.java:515)
> at
> org.eclipse.jdt.internal.core.JavaElement.getElementInfo(Jav aElement.java:252)
> at org.eclipse.jdt.internal.core.Openable.open(Openable.java:43 2)
> at com.kivancmuslu.deneme.Activator.<init>(Activator.java:252)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(Native ConstructorAccessorImpl.java:39)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(De legatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:5 13)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:151)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:751)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:370)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:284)
> at
> org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.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.findLoc alClass(ClasspathManager.java:453)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:216)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:393)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:469)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.loadClass(Bund leLoader.java:338)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:232)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1197)
> at
> org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:174)
> at
> org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:904)
> at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
> at
> org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 55)
> at
> org.eclipse.jdt.internal.ui.text.correction.ContributedProce ssorDescriptor.getProcessor(ContributedProcessorDescriptor.j ava:133)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor$SafeHasCorrections.safeRun(JavaCorrectionProcessor.j ava:445)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor$SafeCorrectionProcessorAccess.run(JavaCorrectionProc essor.java:336)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor$SafeCorrectionProcessorAccess.process(JavaCorrection Processor.java:332)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor.hasCorrections(JavaCorrectionProcessor.java:110)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor.hasCorrections(JavaCorrectionProcessor.java:131)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.showQuickFix(JavaAnnotationImageProvider.java:89)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.getImageType(JavaAnnotationImageProvider.java:115)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.getManagedImage(JavaAnnotationImageProvider.java:65)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.getImage(JavaAnnotationImageProvider.java:131)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.getManagedImage(JavaAnnotationImageProvider.java:66)
> at
> org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.getI mage(DefaultMarkerAnnotationAccess.java:377)
> at
> org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.pain t(DefaultMarkerAnnotationAccess.java:264)
> at
> org.eclipse.jface.text.source.AnnotationRulerColumn.doPaint1 (AnnotationRulerColumn.java:790)
> at
> org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBu fferPaint(AnnotationRulerColumn.java:541)
> at
> org.eclipse.jface.text.source.AnnotationRulerColumn.access$3 (AnnotationRulerColumn.java:517)
> at
> org.eclipse.jface.text.source.AnnotationRulerColumn$1.paintC ontrol(AnnotationRulerColumn.java:289)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:223)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
> at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1131 )
> at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:134)
> at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:685)
> at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:129)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4958 )
> at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
> at
> org.eclipse.swt.internal.cocoa.NSWindow.makeKeyAndOrderFront (NSWindow.java:190)
> at
> org.eclipse.swt.widgets.Shell.makeKeyAndOrderFront(Shell.jav a:1130)
> at org.eclipse.swt.widgets.Shell.setWindowVisible(Shell.java:17 40)
> at org.eclipse.swt.widgets.Shell.open(Shell.java:1173)
> at org.eclipse.jface.window.Window.open(Window.java:797)
> at
> org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow .java:790)
> at
> org.eclipse.ui.internal.Workbench$66.runWithException(Workbe nch.java:3660)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3586)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3279)
> at
> org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:803)
> at
> org.eclipse.ui.internal.Workbench$31.runWithException(Workbe nch.java:1567)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3586)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3279)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
> 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(Work bench.java:664)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.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(EclipseS tarter.java:369)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
>
> !ENTRY org.eclipse.jdt.ui 4 10001 2011-01-26 12:28:05.413
> !MESSAGE Internal Error
> !STACK 1
> org.eclipse.core.runtime.CoreException: Plug-in com.kivancmuslu.deneme
> was unable to load class
> edu.uw.quickfix.speculation.proposal.QuickFixProcessor.
> 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.createE xecutableExtension(ExtensionRegistry.java:904)
> at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
> at
> org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 55)
> at
> org.eclipse.jdt.internal.ui.text.correction.ContributedProce ssorDescriptor.getProcessor(ContributedProcessorDescriptor.j ava:133)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor$SafeHasCorrections.safeRun(JavaCorrectionProcessor.j ava:445)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor$SafeCorrectionProcessorAccess.run(JavaCorrectionProc essor.java:336)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor$SafeCorrectionProcessorAccess.process(JavaCorrection Processor.java:332)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor.hasCorrections(JavaCorrectionProcessor.java:110)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor.hasCorrections(JavaCorrectionProcessor.java:131)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.showQuickFix(JavaAnnotationImageProvider.java:89)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.getImageType(JavaAnnotationImageProvider.java:115)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.getManagedImage(JavaAnnotationImageProvider.java:65)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.getImage(JavaAnnotationImageProvider.java:131)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.getManagedImage(JavaAnnotationImageProvider.java:66)
> at
> org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.getI mage(DefaultMarkerAnnotationAccess.java:377)
> at
> org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.pain t(DefaultMarkerAnnotationAccess.java:264)
> at
> org.eclipse.jface.text.source.AnnotationRulerColumn.doPaint1 (AnnotationRulerColumn.java:790)
> at
> org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBu fferPaint(AnnotationRulerColumn.java:541)
> at
> org.eclipse.jface.text.source.AnnotationRulerColumn.access$3 (AnnotationRulerColumn.java:517)
> at
> org.eclipse.jface.text.source.AnnotationRulerColumn$1.paintC ontrol(AnnotationRulerColumn.java:289)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:223)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
> at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1131 )
> at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:134)
> at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:685)
> at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:129)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4958 )
> at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
> at
> org.eclipse.swt.internal.cocoa.NSWindow.makeKeyAndOrderFront (NSWindow.java:190)
> at
> org.eclipse.swt.widgets.Shell.makeKeyAndOrderFront(Shell.jav a:1130)
> at org.eclipse.swt.widgets.Shell.setWindowVisible(Shell.java:17 40)
> at org.eclipse.swt.widgets.Shell.open(Shell.java:1173)
> at org.eclipse.jface.window.Window.open(Window.java:797)
> at
> org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow .java:790)
> at
> org.eclipse.ui.internal.Workbench$66.runWithException(Workbe nch.java:3660)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3586)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3279)
> at
> org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:803)
> at
> org.eclipse.ui.internal.Workbench$31.runWithException(Workbe nch.java:1567)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3586)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3279)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
> 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(Work bench.java:664)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.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(EclipseS tarter.java:369)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
> Caused by:
> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException:
> An error occurred while automatically activating bundle
> com.kivancmuslu.deneme (485).
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:121)
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:453)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:216)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:393)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:469)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.loadClass(Bund leLoader.java:338)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:232)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1197)
> at
> org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:174)
> ... 72 more
> Caused by: org.osgi.framework.BundleException: The activator
> com.kivancmuslu.deneme.Activator for bundle com.kivancmuslu.deneme is
> invalid
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:156)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:751)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:370)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:284)
> at
> org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.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)
> ... 84 more
> Caused by: Java Model Exception: Java Model Status [<project root> [in
> Quickfixes] is not on its project's build path]
> at
> org.eclipse.jdt.internal.core.JavaElement.newJavaModelExcept ion(JavaElement.java:502)
> at
> org.eclipse.jdt.internal.core.Openable.generateInfos(Openabl e.java:246)
> at
> org.eclipse.jdt.internal.core.Openable.openAncestors(Openabl e.java:504)
> at
> org.eclipse.jdt.internal.core.Openable.generateInfos(Openabl e.java:240)
> at
> org.eclipse.jdt.internal.core.Openable.openAncestors(Openabl e.java:504)
> at
> org.eclipse.jdt.internal.core.CompilationUnit.openAncestors( CompilationUnit.java:1170)
> at
> org.eclipse.jdt.internal.core.Openable.generateInfos(Openabl e.java:240)
> at
> org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(Jav aElement.java:515)
> at
> org.eclipse.jdt.internal.core.JavaElement.getElementInfo(Jav aElement.java:252)
> at org.eclipse.jdt.internal.core.Openable.open(Openable.java:43 2)
> at com.kivancmuslu.deneme.Activator.<init>(Activator.java:252)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(Native ConstructorAccessorImpl.java:39)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(De legatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:5 13)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:151)
> ... 90 more
> !SUBENTRY 1 org.eclipse.equinox.registry 4 1 2011-01-26 12:28:05.417
> !MESSAGE Plug-in com.kivancmuslu.deneme was unable to load class
> edu.uw.quickfix.speculation.proposal.QuickFixProcessor.
> !STACK 0
> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException:
> An error occurred while automatically activating bundle
> com.kivancmuslu.deneme (485).
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:121)
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:453)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:216)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:393)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:469)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.loadClass(Bund leLoader.java:338)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:232)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1197)
> at
> org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:174)
> at
> org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:904)
> at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
> at
> org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 55)
> at
> org.eclipse.jdt.internal.ui.text.correction.ContributedProce ssorDescriptor.getProcessor(ContributedProcessorDescriptor.j ava:133)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor$SafeHasCorrections.safeRun(JavaCorrectionProcessor.j ava:445)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor$SafeCorrectionProcessorAccess.run(JavaCorrectionProc essor.java:336)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor$SafeCorrectionProcessorAccess.process(JavaCorrection Processor.java:332)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor.hasCorrections(JavaCorrectionProcessor.java:110)
> at
> org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionPr ocessor.hasCorrections(JavaCorrectionProcessor.java:131)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.showQuickFix(JavaAnnotationImageProvider.java:89)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.getImageType(JavaAnnotationImageProvider.java:115)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.getManagedImage(JavaAnnotationImageProvider.java:65)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.getImage(JavaAnnotationImageProvider.java:131)
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImagePr ovider.getManagedImage(JavaAnnotationImageProvider.java:66)
> at
> org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.getI mage(DefaultMarkerAnnotationAccess.java:377)
> at
> org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.pain t(DefaultMarkerAnnotationAccess.java:264)
> at
> org.eclipse.jface.text.source.AnnotationRulerColumn.doPaint1 (AnnotationRulerColumn.java:790)
> at
> org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBu fferPaint(AnnotationRulerColumn.java:541)
> at
> org.eclipse.jface.text.source.AnnotationRulerColumn.access$3 (AnnotationRulerColumn.java:517)
> at
> org.eclipse.jface.text.source.AnnotationRulerColumn$1.paintC ontrol(AnnotationRulerColumn.java:289)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:223)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
> at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1131 )
> at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:134)
> at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:685)
> at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:129)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4958 )
> at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
> at
> org.eclipse.swt.internal.cocoa.NSWindow.makeKeyAndOrderFront (NSWindow.java:190)
> at
> org.eclipse.swt.widgets.Shell.makeKeyAndOrderFront(Shell.jav a:1130)
> at org.eclipse.swt.widgets.Shell.setWindowVisible(Shell.java:17 40)
> at org.eclipse.swt.widgets.Shell.open(Shell.java:1173)
> at org.eclipse.jface.window.Window.open(Window.java:797)
> at
> org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow .java:790)
> at
> org.eclipse.ui.internal.Workbench$66.runWithException(Workbe nch.java:3660)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3586)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3279)
> at
> org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:803)
> at
> org.eclipse.ui.internal.Workbench$31.runWithException(Workbe nch.java:1567)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3586)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3279)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
> 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(Work bench.java:664)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.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(EclipseS tarter.java:369)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
> Caused by: org.osgi.framework.BundleException: The activator
> com.kivancmuslu.deneme.Activator for bundle com.kivancmuslu.deneme is
> invalid
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:156)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:751)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:370)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:284)
> at
> org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.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)
> ... 84 more
> Caused by: Java Model Exception: Java Model Status [<project root> [in
> Quickfixes] is not on its project's build path]
> at
> org.eclipse.jdt.internal.core.JavaElement.newJavaModelExcept ion(JavaElement.java:502)
> at
> org.eclipse.jdt.internal.core.Openable.generateInfos(Openabl e.java:246)
> at
> org.eclipse.jdt.internal.core.Openable.openAncestors(Openabl e.java:504)
> at
> org.eclipse.jdt.internal.core.Openable.generateInfos(Openabl e.java:240)
> at
> org.eclipse.jdt.internal.core.Openable.openAncestors(Openabl e.java:504)
> at
> org.eclipse.jdt.internal.core.CompilationUnit.openAncestors( CompilationUnit.java:1170)
> at
> org.eclipse.jdt.internal.core.Openable.generateInfos(Openabl e.java:240)
> at
> org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(Jav aElement.java:515)
> at
> org.eclipse.jdt.internal.core.JavaElement.getElementInfo(Jav aElement.java:252)
> at org.eclipse.jdt.internal.core.Openable.open(Openable.java:43 2)
> at com.kivancmuslu.deneme.Activator.<init>(Activator.java:252)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(Native ConstructorAccessorImpl.java:39)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(De legatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:5 13)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:151)
> ... 90 more
>
>
> Any idea why this might happen or how I can fix it? Thanks in advance,
> best regards,
Re: How to open an IJavaElement programatically? [message #650945 is a reply to message #650939] Thu, 27 January 2011 09:20 Go to previous messageGo to next message
Kivanc Muslu is currently offline Kivanc MusluFriend
Messages: 153
Registered: November 2010
Senior Member
Hi Dani,

Thank you for your question. Sorry that I wasn't clear.

What I really want to do is that to perform a Change object (created using QuickFixProcessor).

However, the problem is that, I figured out, the change is not applied if the particular file that it will modify (i.e., change.getModifiedElement()) is not open in the Eclipse's page view and selected at least one. I know that it sounds strange, however I have tried it many times with many debugging and if I don't open the file in Eclipse's workbench page, then when I invoke change.perform() nothing happens (I don't get an error, no notification). On the other hand if the file is open and selected, then when I say change.perform() the change is applied correctly.

I have to do the whole process (creating the change and applying it automatically, i.e., I cannot open the file that would change manually). Therefore, I need to one of the following before invoking change.perform()
1- Actually open the file on the workbench page (so that it is also selected) and run the change. I have tried this inside the constructor of the plugin, it works, however the actual thread that should do this is a background thread and since it is not a GUI thread, Eclipse API throws exception when I try to open an editor for the file to change (using page.openEditor()).
2- Figure out what does opening the file int eh workbench page changes internally for an IFile or CompilationUnit. I guess that if I can mimic the same thing without actually opening the file in the page, then the change will also be applied correctly.

I might be missing something or if anything does not make sense please point it, I will try to explain in detail. Again, thank you for your interest,

Regards,
Re: How to open an IJavaElement programatically? [message #651192 is a reply to message #650945] Fri, 28 January 2011 10:32 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 27.01.2011 10:20, Kivanc Muslu wrote:
> Hi Dani,
>
> Thank you for your question. Sorry that I wasn't clear.
>
> What I really want to do is that to perform a Change object (created
> using QuickFixProcessor).
This is an internal class which you should not use and for which there's
no support. You should create your own Change(Operation).

Dani
> However, the problem is that, I figured out, the change is not applied
> if the particular file that it will modify (i.e.,
> change.getModifiedElement()) is not open in the Eclipse's page view
> and selected at least one. I know that it sounds strange, however I
> have tried it many times with many debugging and if I don't open the
> file in Eclipse's workbench page, then when I invoke change.perform()
> nothing happens (I don't get an error, no notification). On the other
> hand if the file is open and selected, then when I say
> change.perform() the change is applied correctly.
> I have to do the whole process (creating the change and applying it
> automatically, i.e., I cannot open the file that would change
> manually). Therefore, I need to one of the following before invoking
> change.perform()
> 1- Actually open the file on the workbench page (so that it is also
> selected) and run the change. I have tried this inside the constructor
> of the plugin, it works, however the actual thread that should do this
> is a background thread and since it is not a GUI thread, Eclipse API
> throws exception when I try to open an editor for the file to change
> (using page.openEditor()).
> 2- Figure out what does opening the file int eh workbench page changes
> internally for an IFile or CompilationUnit. I guess that if I can
> mimic the same thing without actually opening the file in the page,
> then the change will also be applied correctly.
>
> I might be missing something or if anything does not make sense please
> point it, I will try to explain in detail. Again, thank you for your
> interest,
>
> Regards,
Re: How to open an IJavaElement programatically? [message #651195 is a reply to message #651192] Fri, 28 January 2011 10:42 Go to previous messageGo to next message
Kivanc Muslu is currently offline Kivanc MusluFriend
Messages: 153
Registered: November 2010
Senior Member
Hi,

I don't want to create a new Change object. I get the Change object casting the IJavaCompletionProposal object that QuickFixProcessor returns (when I invoke .getCorrections(...)) to a ChangeCorrectionProposal. I invoke .getChange(...) on the ChangeCorrectionProposal object to get the change.

As I said my goal is not create a change, but apply a change already created by the quick fix processor itself before the user actually clicks that quick fix (if the user would have clicked to it, Eclipse already applies it correctly).

Does this make the question more clear?
Re: How to open an IJavaElement programatically? [message #651204 is a reply to message #651195] Fri, 28 January 2011 10:49 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 28.01.2011 11:42, Kivanc Muslu wrote:
> Hi,
>
> I don't want to create a new Change object. I get the Change object
> casting the IJavaCompletionProposal object that QuickFixProcessor
> returns (when I invoke .getCorrections(...)) to a
> ChangeCorrectionProposal. I invoke .getChange(...) on the
> ChangeCorrectionProposal object to get the change.
>
> As I said my goal is not create a change, but apply a change already
> created by the quick fix processor itself before the user actually
> clicks that quick fix (if the user would have clicked to it, Eclipse
> already applies it correctly).
>
> Does this make the question more clear?
Yep. So, why don't you check how Eclipse applies that change?

Dani
Re: How to open an IJavaElement programatically? [message #651206 is a reply to message #651204] Fri, 28 January 2011 11:08 Go to previous messageGo to next message
Kivanc Muslu is currently offline Kivanc MusluFriend
Messages: 153
Registered: November 2010
Senior Member
Excellent point.

The problem is that, though I have searched many files in the unarchived plug-ins folder of Eclipse (i.e., I un-jared all plug-ins in the same folder), I couldn't find an exact location or anything that could bring me there.

More specifically, I have searched for new QuickFixProcessor(...) and getCorrections(...) in the source code directory, however the results were not related.

Most of the getCorrections(...) were for the classes that implemented IQuickFixProcessor (they were simply overriding it), so I couldn't find place to start to dig into the code.

Do you by any chance know a good place so that maybe following that I could find the source code that does this? For example: do you know what is executed when the actual user clicks to a possible quick fix? Or what part of the GUI code is that dialog box (or gadget) is? I think these would be excellent starts for me, however I have no idea to which code they point to.

Thank you,
Re: How to open an IJavaElement programatically? [message #651208 is a reply to message #651206] Fri, 28 January 2011 11:21 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 28.01.2011 12:08, Kivanc Muslu wrote:
> Excellent point.
>
> The problem is that, though I have searched many files in the
> unarchived plug-ins folder of Eclipse (i.e., I un-jared all plug-ins
> in the same folder), I couldn't find an exact location or anything
> that could bring me there.
Take a look at the apply(...) methods on the proposal.

Dani
>
> More specifically, I have searched for new QuickFixProcessor(...) and
> getCorrections(...) in the source code directory, however the results
> were not related.
>
> Most of the getCorrections(...) were for the classes that implemented
> IQuickFixProcessor (they were simply overriding it), so I couldn't
> find place to start to dig into the code.
>
> Do you by any chance know a good place so that maybe following that I
> could find the source code that does this? For example: do you know
> what is executed when the actual user clicks to a possible quick fix?
> Or what part of the GUI code is that dialog box (or gadget) is? I
> think these would be excellent starts for me, however I have no idea
> to which code they point to.
>
> Thank you,
Re: How to open an IJavaElement programatically? [message #651222 is a reply to message #651208] Fri, 28 January 2011 13:06 Go to previous messageGo to next message
Kivanc Muslu is currently offline Kivanc MusluFriend
Messages: 153
Registered: November 2010
Senior Member
Hi Dani,

I had written a quite long reply normally, however for some reason the system didn't accept it and it is gone.

In summary (please ask me if something is not clear, I would explain it in more detail), I have looked at ChangeCorrectionProposal.apply(...). It seems that it is getting active page (which is got through the active window). I am not sure if this is my problem but, I am sure that when you try to get active window using a non-UI thread, then it returns null (it is even documented to return null in this case). So in my version, I definitely cannot get the active page (I get null), because I need to apply the changes using a background thread (daemon).

So, my question is: When I do change.perform(...) it doesn't change anything in the target file. Is this due to the fact that I am invoking it from a non-UI thread, and this is not permitted? If so, I might need to completely change my design, if not, I will look more into it.

I ask this, because other than that what is done in ChagneCorrectionProposal.apply(...) seems very alike to the pattern proposed in Change.java documentation to apply the changes.
 * Here is a code snippet that can be used to execute a change:
 * <pre>
 *   Change change= createChange();
 *   try {
 *     change.initializeValidationData(pm);
 * 
 *     ....
 *
 *     if (!change.isEnabled())
 *         return;
 *     RefactoringStatus valid= change.isValid(new SubProgressMonitor(pm, 1));
 *     if (valid.hasFatalError())
 *         return;
 *     Change undo= change.perform(new SubProgressMonitor(pm, 1));
 *     if (undo != null) {
 *        undo.initializeValidationData(new SubProgressMonitor(pm, 1));
 *        // do something with the undo object
 *     }
 *   } finally {
 *     change.dispose();
 *   }


I also use a minor modified version of this above code to perform the changes. As I said however, when I invoke change.perform(...) (which returns normally), the target file does not change.

However, if I do the same using a UI thread (i.e., from plug-in's constructor for testing), then it again does not change the target file (performing the change does not change the target file).

However, if I do the same using a UI thread, and if I open the file that is supposed to change using page.openEditor(...) (since this is a UI thread, I can get the active page), now the change is applied correctly and the target file is updated accordingly.

Since I don't know the internal of these whole classes and the interaction between them, this seems pretty weird to me (i.e., it is like that I need to open the file inside an editor to apply a change object on it). Again, I might be missing something.

Thanks a lot for the help, any further guidance is greatly appreciated.

Regards,
Re: How to open an IJavaElement programatically? [message #651248 is a reply to message #651222] Fri, 28 January 2011 14:39 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 28.01.2011 14:06, Kivanc Muslu wrote:
> Hi Dani,
>
> I had written a quite long reply normally, however for some reason the
> system didn't accept it and it is gone.
>
> In summary (please ask me if something is not clear, I would explain
> it in more detail), I have looked at
> ChangeCorrectionProposal.apply(...). It seems that it is getting
> active page (which is got through the active window). I am not sure if
> this is my problem but, I am sure that when you try to get active
> window using a non-UI thread, then it returns null (it is even
> documented to return null in this case). So in my version, I
> definitely cannot get the active page (I get null), because I need to
> apply the changes using a background thread (daemon).
>
> So, my question is: When I do change.perform(...) it doesn't change
> anything in the target file. Is this due to the fact that I am
> invoking it from a non-UI thread,
Why not just post into the UI thread?
Dani
> and this is not permitted? If so, I might need to completely change my
> design, if not, I will look more into it.
>
> I ask this, because other than that what is done in
> ChagneCorrectionProposal.apply(...) seems very alike to the pattern
> proposed in Change.java documentation to apply the changes.
>
> * Here is a code snippet that can be used to execute a change:
> * <pre>
> * Change change= createChange();
> * try {
> * change.initializeValidationData(pm);
> * * ....
> *
> * if (!change.isEnabled())
> * return;
> * RefactoringStatus valid= change.isValid(new
> SubProgressMonitor(pm, 1));
> * if (valid.hasFatalError())
> * return;
> * Change undo= change.perform(new SubProgressMonitor(pm, 1));
> * if (undo != null) {
> * undo.initializeValidationData(new SubProgressMonitor(pm, 1));
> * // do something with the undo object
> * }
> * } finally {
> * change.dispose();
> * }
>
>
> I also use a minor modified version of this above code to perform the
> changes. As I said however, when I invoke change.perform(...) (which
> returns normally), the target file does not change.
>
> However, if I do the same using a UI thread (i.e., from plug-in's
> constructor for testing), then it again does not change the target
> file (performing the change does not change the target file).
>
> However, if I do the same using a UI thread, and if I open the file
> that is supposed to change using page.openEditor(...) (since this is a
> UI thread, I can get the active page), now the change is applied
> correctly and the target file is updated accordingly.
>
> Since I don't know the internal of these whole classes and the
> interaction between them, this seems pretty weird to me (i.e., it is
> like that I need to open the file inside an editor to apply a change
> object on it). Again, I might be missing something.
>
> Thanks a lot for the help, any further guidance is greatly appreciated.
>
> Regards,
Re: How to open an IJavaElement programatically? [message #651302 is a reply to message #651248] Fri, 28 January 2011 20:20 Go to previous messageGo to next message
Kivanc Muslu is currently offline Kivanc MusluFriend
Messages: 153
Registered: November 2010
Senior Member
Hi Dani,

How can I run something on an Eclipse UI thread, rather than my background daemon? Is there an API for this?

Thank you,
Re: How to open an IJavaElement programatically? [message #651321 is a reply to message #651302] Sat, 29 January 2011 01:46 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 1/29/2011 1:50 AM, Kivanc Muslu wrote:
> Hi Dani,
>
> How can I run something on an Eclipse UI thread, rather than my
> background daemon? Is there an API for this?
> Thank you,
Display.syncexec() or WorkbenchJob.runInUIThread()
Re: How to open an IJavaElement programatically? [message #651324 is a reply to message #651321] Sat, 29 January 2011 03:13 Go to previous message
Kivanc Muslu is currently offline Kivanc MusluFriend
Messages: 153
Registered: November 2010
Senior Member
Dear Deepak and Dani,

I cannot tell how grateful I am to both of you figuring out this fairly complex (at least for me) problem.

Problem solved, Thanks a lot!

Regards,
Previous Topic:Getting non-saved changes using IResourceChangeListener
Next Topic:Many "Ressources out of sync" - Special F5 for refreshing all files at once?
Goto Forum:
  


Current Time: Thu Apr 18 17:15:37 GMT 2024

Powered by FUDForum. Page generated in 0.02866 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top