Skip to main content



      Home
Home » Eclipse Projects » WindowBuilder » SWTResourceManager: Error from Wrong Build File(Project compiles SWTResourceManager incorrectly and causes errors everywhere)
SWTResourceManager: Error from Wrong Build File [message #712031] Sat, 06 August 2011 20:05 Go to next message
Eclipse UserFriend
I deleted my build directory recently just to start it fresh. It re-built, but then it wouldn't work. Errors came up in my code for no reason, all for using classes that supposedly "couldn't be resolved to a type" that are right there in my code, and in the build output. So, I restored the build folder from the trash folder, and narrowed the problem down to org.eclipse.wb.swt.SWTResourceManager. If I let it build a fresh .class file for it, Eclipse shows errors in my code. If I restore the old .class file, everything's just peachy. According to Windows Explorer, the bad (new) file is 8,097 bytes. The good (old) one is 11,094 bytes; they are clearly different files.

What could cause this? The source file (for SWTResourceManager) looks fine. I tried commenting out all references to it (SWTResourceManager), but it didn't help.

Thanks
Re: SWTResourceManager: Error from Wrong Build File [message #712081 is a reply to message #712031] Sat, 06 August 2011 21:37 Go to previous messageGo to next message
Eclipse UserFriend
You haven't provided much information here about the "Errors" that "came up", but I would suspect a JDK mismatch problem. You didn't mention which JDK versions were used to compile the old vs. the new .class files or which JDK is used to run Eclipse.

In any case, this does not sound like a WindowBuilder related problem.
Re: SWTResourceManager: Error from Wrong Build File [message #712111 is a reply to message #712081] Sat, 06 August 2011 22:39 Go to previous messageGo to next message
Eclipse UserFriend
@Eric thanks for the reply. I looked closely, and it seems that the only two files with errors were the only two files in the application with public static void main() methods. Any classes in my application I was referencing from those showed up as "could not resolve to a type".

Long story short, after further assessment, it seems to have something to do with the project being in sync with the filesystem. Apparently it tries to find the referenced classes before building. Refreshing after compiling seems to fix the problem.

So you're right, it wasn't a WindowBuilder problem after all. Thanks a lot Smile.

[Updated on: Sat, 06 August 2011 22:41] by Moderator

Re: SWTResourceManager: Error from Wrong Build File [message #712669 is a reply to message #712111] Sun, 07 August 2011 11:28 Go to previous messageGo to next message
Eclipse UserFriend
When faced with a weird compilation problem in Eclipse, doing a refresh and/or rebuild is always a good idea.
Re: SWTResourceManager: Error from Wrong Build File [message #712808 is a reply to message #712669] Sun, 07 August 2011 15:29 Go to previous message
Eclipse UserFriend
Okay, thanks for the advice Smile

Edit: seems that emoticons are busted.

[Updated on: Sun, 07 August 2011 15:30] by Moderator

Previous Topic:Getting Developers involved with WindowBuilder
Next Topic:e4 example
Goto Forum:
  


Current Time: Tue Jul 08 08:00:04 EDT 2025

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

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

Back to the top