Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Formattted Text Widget
Formattted Text Widget [message #37777] Thu, 26 July 2007 19:01 Go to next message
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 #37817 is a reply to message #37777] Mon, 30 July 2007 17:12 Go to previous messageGo to next message
Eric Wuillai is currently offline Eric Wuillai
Messages: 27
Registered: July 2009
Junior Member
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 #37850 is a reply to message #37817] Tue, 31 July 2007 15:42 Go to previous messageGo to next message
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 #37883 is a reply to message #37850] Tue, 31 July 2007 18:16 Go to previous messageGo to next message
Eric Wuillai is currently offline Eric Wuillai
Messages: 27
Registered: July 2009
Junior Member
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 #37916 is a reply to message #37883] Tue, 31 July 2007 18:27 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5012
Registered: July 2009
Senior Member
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 #37948 is a reply to message #37883] Thu, 02 August 2007 11:39 Go to previous messageGo to next message
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 #37981 is a reply to message #37916] Thu, 02 August 2007 15:57 Go to previous messageGo to next message
Chris Gross is currently offline Chris Gross
Messages: 253
Registered: July 2009
Senior Member
> 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 #38016 is a reply to message #37948] Thu, 02 August 2007 17:55 Go to previous message
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 Go to previous message
Eric Wuillai is currently offline Eric Wuillai
Messages: 27
Registered: July 2009
Junior Member
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 Go to previous message
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 Go to previous message
Eric Wuillai is currently offline Eric Wuillai
Messages: 27
Registered: July 2009
Junior Member
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 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5012
Registered: July 2009
Senior Member
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 Go to previous message
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 Go to previous message
Chris Gross is currently offline Chris Gross
Messages: 471
Registered: July 2009
Senior Member
> 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 Go to previous message
Chris Aniszczyk is currently offline Chris Aniszczyk
Messages: 674
Registered: July 2009
Senior Member
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
Previous Topic:Formattted Text Widget
Next Topic:CompositeTable and Databinding
Goto Forum:
  


Current Time: Thu Apr 17 14:35:09 EDT 2014

Powered by FUDForum. Page generated in 0.01994 seconds