Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Accessing a selected Java file in a multipage editor(What is the bet way to create an ICompilationUnit from IFile in a multipage editor)
Accessing a selected Java file in a multipage editor [message #529421] Sun, 25 April 2010 03:42 Go to next message
Eclipse UserFriend
I have created a Multipage editor with the following plug-in dependencies:
org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.jface.text,
org.eclipse.core.resources,
org.eclipse.ui.editors,
org.eclipse.ui.ide,
org.eclipse.jdt.core;bundle-version="3.5.2"

I am trying to access the compilationunit using the following snippet

...
...
IFile file = ((FileEditorInput)getEditorInput()).getFile();
JavaCore.createCompilationUnitFrom(file);
...
...

I get a java.lang.NoClassDefFoundError: org/eclipse/jdt/core/JavaCore when the plugin is executed.

Am I missing any dependencies? Has anyone faced similar issues before?
Re: Accessing a selected Java file in a multipage editor [message #529434 is a reply to message #529421] Sun, 25 April 2010 08:11 Go to previous messageGo to next message
Eclipse UserFriend
Update: When I renamed the plugin (changed the qualifier) everything works fine. If someone can de-mistify this for me, it would be really great! I am guessing, my renaming the plug-in somehow cleaned up the dependencies and added the required ones.
Re: Accessing a selected Java file in a multipage editor [message #529604 is a reply to message #529434] Mon, 26 April 2010 09:33 Go to previous messageGo to next message
Eclipse UserFriend
You mean when deployed? or in your workspace? Sometimes in the
workspace you need to use the context menu PDE Tools>Update Classpath
(this is a PDE problem, not a JDT problem).

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Re: Accessing a selected Java file in a multipage editor [message #529696 is a reply to message #529604] Mon, 26 April 2010 15:35 Go to previous message
Eclipse UserFriend
Does this mean the jar files get added when we do PDE Tools -> Update Classpath?
Previous Topic:Cmake problem
Next Topic:Connecting to network drive on Mac
Goto Forum:
  


Current Time: Thu Mar 20 15:23:33 EDT 2025

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

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

Back to the top