Formattted Text Widget [message #37777] |
Thu, 26 July 2007 19:01  |
Eclipse User |
|
|
|
Originally posted by: tim.mehrens.fiserv.com
I am still trying to use the Formatted Text Widget. To get this to work I
was told to get the jar out of my project classpath and put it in the
plugin classpath. My problem is that when I do this I get import errors
in the editor class that uses the jar.
To add the jar to my plugin classpath I created a new folder called /lib
to my project and copied the jar to it using windows explorer. I then
double clicked the plugin.xml file to open up the project Manifest >
Selected the Runtime tab > Added the /lib folder to the Classpath.
How do I associate this jar with the plugin and resolve the problem of the
editor that uses the jar not being able to find the jar to be able to
import it?
TIA
|
|
|
|
|
|
|
|
|
Re: Formattted Text Widget [message #38016 is a reply to message #37948] |
Thu, 02 August 2007 17:55  |
Eclipse User |
|
|
|
Originally posted by: zx.us.ibm.com
Please add it using Require-Bundle, please get out of the mindset of
managing your own classpath and have Eclipse/PDE do it for you :)
Managing classpaths is so 90's :P
Cheers,
~ Chris
|
|
|
Re: Formattted Text Widget [message #583701 is a reply to message #37777] |
Mon, 30 July 2007 17:12  |
Eclipse User |
|
|
|
Sorry to respond only now, I was in vacation.
> I am still trying to use the Formatted Text Widget. To get this to work
> I was told to get the jar out of my project classpath and put it in the
> plugin classpath. My problem is that when I do this I get import errors
> in the editor class that uses the jar.
>
> To add the jar to my plugin classpath I created a new folder called /lib
> to my project and copied the jar to it using windows explorer. I then
Correct.
> double clicked the plugin.xml file to open up the project Manifest >
> Selected the Runtime tab > Added the /lib folder to the Classpath.
Adding the lib folder (appears as "lib/") does not work.
You must explicitly add each jar file you want in the plugin classpath
with the Add... button.
>
> How do I associate this jar with the plugin and resolve the problem of
> the editor that uses the jar not being able to find the jar to be able
> to import it?
>
> TIA
>
>
Regards
Eric
|
|
|
Re: Formattted Text Widget [message #583713 is a reply to message #37817] |
Tue, 31 July 2007 15:42  |
Eclipse User |
|
|
|
Originally posted by: tim.mehrens.fiserv.com
Eric,
How do you set it up so I can select just the formattedtext.jar? When I
click on the Add button next to the Classpath window in the plugin.xml
runtime tab all I see are the diretories that are in my project.
Tim
|
|
|
Re: Formattted Text Widget [message #583727 is a reply to message #37850] |
Tue, 31 July 2007 18:16  |
Eclipse User |
|
|
|
When you click on the Add button, the dialog that opens should show all
jar files not already selected in your lib directory.
If the formattedtext.jar does not appear, that is normally it is already
in your plugin classpath.
As an alternative, you can verify / edit your manifest file.
In the plugin editor, select the MANIFEST.MF tab.
There should be something like :
Bundle-ClassPath: .,lib/formattedtext.jar
Eric
Tim Mehrens a écrit :
> Eric,
>
> How do you set it up so I can select just the formattedtext.jar? When I
> click on the Add button next to the Classpath window in the plugin.xml
> runtime tab all I see are the diretories that are in my project.
> Tim
|
|
|
Re: Formattted Text Widget [message #583741 is a reply to message #37883] |
Tue, 31 July 2007 18:27  |
Eclipse User |
|
|
|
Wouldn't it be the easiest thing if your widget was delivered as a plugin?
Tom
Eric Wuillai schrieb:
> When you click on the Add button, the dialog that opens should show all
> jar files not already selected in your lib directory.
> If the formattedtext.jar does not appear, that is normally it is already
> in your plugin classpath.
>
> As an alternative, you can verify / edit your manifest file.
> In the plugin editor, select the MANIFEST.MF tab.
> There should be something like :
> Bundle-ClassPath: .,lib/formattedtext.jar
>
> Eric
>
> Tim Mehrens a écrit :
>> Eric,
>>
>> How do you set it up so I can select just the formattedtext.jar? When I
>> click on the Add button next to the Classpath window in the plugin.xml
>> runtime tab all I see are the diretories that are in my project.
>> Tim
--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
|
|
|
Re: Formattted Text Widget [message #583756 is a reply to message #37883] |
Thu, 02 August 2007 11:39  |
Eclipse User |
|
|
|
Originally posted by: tim.mehrens.fiserv.com
Eric,
I added the following line to my Manifest.MF
Bundle-ClassPath: .,lib/org.eclipse.nebula.widgets.formatttedtext_1.0.0.jar
The jar is in the lib directory of the project
I then removed the jar from my Project Build Path and the following code
gets an error message that "The import org.eclipse.nebula cannot be
resolved."
I would really love to use this widget. What am I doing wrong?
package util;
import org.eclipse.nebula.widgets.formattedtext.DateFormatter;
import org.eclipse.nebula.widgets.formattedtext.FormattedText;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
/**
* Snippet 2 for DateFormatter : fixed mask yyyy/MM/dd, no default value.
*/
public class DateFormatterSnippet2 {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new GridLayout());
FormattedText text = new FormattedText(shell, SWT.BORDER);
text.setFormatter(new DateFormatter("yyyy/MM/dd"));
GridData data = new GridData();
data.widthHint = 60;
text.getControl().setLayoutData(data);
shell.open();
while ( ! shell.isDisposed() ) {
if (!display.readAndDispatch()) display.sleep();
}
display.dispose();
}
}
|
|
|
Re: Formattted Text Widget [message #583769 is a reply to message #37916] |
Thu, 02 August 2007 15:57  |
Eclipse User |
|
|
|
> Wouldn't it be the easiest thing if your widget was delivered as a
plugin?
Yes - and I'm really confused because it *is* a plugin. Tim/Eric - why
aren't you just adding it as a plugin dependency?
Regards,
-Chris
|
|
|
Re: Formattted Text Widget [message #583775 is a reply to message #37948] |
Thu, 02 August 2007 17:55  |
Eclipse User |
|
|
|
Please add it using Require-Bundle, please get out of the mindset of
managing your own classpath and have Eclipse/PDE do it for you :)
Managing classpaths is so 90's :P
Cheers,
~ Chris
|
|
|
Powered by
FUDForum. Page generated in 0.30651 seconds