Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339387

Summary: DateChooserCombo.setFormatter throws NoSuchMethodError
Product: z_Archived Reporter: Henno Vermeulen <strider80>
Component: NebulaAssignee: Wim Jongman <wim.jongman>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: wim.jongman
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Snippet which shows Bug 339387 none

Description Henno Vermeulen CLA 2011-03-09 11:37:50 EST
I am trying to use a DateChooserCombo with a format of "d-M" because for my use case the year is not important.

When I call 
DateChooserCombo.setFormatter(new DateFormatter("d-M", Locale.getDefault()))
I always get this exception:


Exception in thread "main" java.lang.NoSuchMethodError: org.eclipse.nebula.widgets.formattedtext.DateFormatter.getLocale()Ljava/util/Locale;
	at org.eclipse.nebula.widgets.datechooser.DateChooserCombo.setFormatter(DateChooserCombo.java:319)
at ...


I am using datechooser-1.0.0.jar and formattedtext-1.0.0.jar that came with SWT Designer version 7.3.0.r35x201001261015.

Indeed Eclipse's content assist indeed does not show a method getLocale on DateFormatter! Did they bundle two incompatible versions?? Should I manually download the most up to date versions of these bundles?
Comment 1 Henno Vermeulen CLA 2011-03-28 11:36:19 EDT
I am also getting this with datechooser and formattedtext the nightly build downloaded from https://hudson.eclipse.org/hudson/view/Tycho%20+%20Maven/job/maven-nebula-inc-nightly/lastSuccessfulBuild/artifact/
Comment 2 Henno Vermeulen CLA 2011-03-28 11:39:57 EDT
Created attachment 192016 [details]
Snippet which shows Bug 339387
Comment 3 Wim Jongman CLA 2011-03-29 11:11:06 EDT
Hi

You snippet runs fine when I try it. Here is what i did.

http://screencast.com/t/jkifkEkAbcQ

I guess your runtime classpath is different from your development classpath. Please inspect your stacktrace carefully.

Regards,

Wim Jongman
Comment 4 Henno Vermeulen CLA 2011-03-30 05:49:49 EDT
Ok great, I got it working! You are right, the problem was that I had the older libraries on my target platform, but added the snapshot libraries to my project classpath as one would do for a normal java project and not a plugin project.

Conclusion: this issue is only present with the older libraries I used and can be resolved by downloading the latest libraries.